Packing script

This commit is contained in:
Federico Fissore 2015-06-19 11:10:15 +02:00
parent 00ed1c04b7
commit eec7da3df5
2 changed files with 17 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
*.bz2

16
pack.bash Executable file
View file

@ -0,0 +1,16 @@
#!/bin/bash -ex
VERSION=`grep version= platform.txt | sed 's/version=//g'`
PWD=`pwd`
FOLDERNAME=`basename $PWD`
THIS_SCRIPT_NAME=`basename $0`
rm -f samd-$VERSION.tar.bz2
cd ..
tar --transform "s|$FOLDERNAME|$VERSION|g" --exclude=.git --exclude=.idea --exclude=$THIS_SCRIPT_NAME -cjf samd-$VERSION.tar.bz2 $FOLDERNAME
cd -
mv ../samd-$VERSION.tar.bz2 .