Updated git-push-all.sh for sourceforge.net git repo
[barry.git] / tarinsert.sh
blobaa80e14b6e534649dc71161fc69ca8d3fb54067d
1 #!/bin/sh
3 if [ -z "$1" ] ; then
4 echo "Usage: tarinsert.sh compress_option tarball tag "
5 echo
6 echo "Example: tarinsert.sh -z barry-0.0.1.tar.gz barry-0.0.1"
7 echo
8 exit 1
9 fi
11 set -e
12 set -x
14 git checkout -b tarinsert $3
15 git rm -r .
16 tar $1 -xvf $2
17 mv $3/* .
19 set +e
20 mv $(find $3 -type f -print) .
21 set -e
23 rmdir $3
24 git add .
26 set +e
27 git status
28 git commit -m "Release tarball for $3"
29 set -e
31 git tag $(basename $2)
32 git checkout master
33 git clean -xdf
34 git branch -D tarinsert
35 echo "Done!"