Skip to content

Commit

Permalink
Improve packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
kimushu committed Aug 21, 2019
1 parent fe6b435 commit faee1d0
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 14 deletions.
15 changes: 10 additions & 5 deletions package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@ for pack in platform/*/.pack; do
pdir=$(dirname $pack)
name=$(basename $pdir)
echo "Packaging $name ..."
rm -rf $top/$ddir/$name
rsync -a $top/$pdir --exclude .pack $top/$ddir/
cd $top/$ddir/$name
bash -e $top/$pdir/.pack
export DEST_DIR=$top/$ddir/$name
rm -rf $DEST_DIR
mkdir $DEST_DIR
cd $top/$pdir
bash -e .pack
cd $DEST_DIR
out=$ddir/tinythreads-$name-$tag.tar.gz
tar czf $top/$out *
tar czf $top/$out --group=0 --owner=0 *
echo " => $out"
out=$ddir/tinythreads-$name-$tag.zip
zip -rq $top/$out *
echo " => $out"
done
10 changes: 7 additions & 3 deletions platform/nios2/.pack
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
rsync -a $SRC_DIR/ TINYTH/src/
rsync -a $INC_DIR/ TINYTH/inc/
rsync -a $DOCS ./
# Packaging script for NiosII platform
OUT=$DEST_DIR/tinythreads
mkdir $OUT
rsync -a ./ $OUT/
rsync -a $SRC_DIR/ $OUT/TINYTH/src/
rsync -a $INC_DIR/ $OUT/TINYTH/inc/
rsync -a $DOCS $OUT/
10 changes: 7 additions & 3 deletions platform/pic32m/.pack
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
rsync -a $SRC_DIR/ TINYTH/src/
rsync -a $INC_DIR/ TINYTH/inc/
rsync -a $DOCS ./
# Packaging script for PIC32M platform
OUT=$DEST_DIR/tinythreads
mkdir $OUT
rsync -a ./ $OUT/
rsync -a $SRC_DIR/ $OUT/TINYTH/src/
rsync -a $INC_DIR/ $OUT/TINYTH/inc/
rsync -a $DOCS $OUT/
11 changes: 8 additions & 3 deletions platform/zynq/.pack
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
rsync -a $SRC_DIR/ src/
rsync -a $INC_DIR/ src/
rsync -a $DOCS ./
# Packaging script for Zynq platform
VER=$(sed -ne 's/^OPTION VERSION = \([0-9]\+\)\.\([0-9]\+\);$/v\1_\2/p' data/tinythreads.mld)
OUT=$DEST_DIR/tinythreads_$VER
mkdir $OUT
rsync -a ./ $OUT/
rsync -a $SRC_DIR/ $OUT/src/
rsync -a $INC_DIR/ $OUT/src/
rsync -a $DOCS $OUT/

0 comments on commit faee1d0

Please sign in to comment.