Merge branch 'stable' into tunnel
[olsrd.git] / scripts / mk-tarball.sh
index 75c6903..52263b4 100755 (executable)
 
 # first determine the tarball name
 NAME=`grep -E "^VERS" ../Makefile | sed 's/^VERS..../olsrd-/;s/ *$//'`
 
 # first determine the tarball name
 NAME=`grep -E "^VERS" ../Makefile | sed 's/^VERS..../olsrd-/;s/ *$//'`
-echo "### creating $NAME.tgz in /tmp"
+#empty the directory in case it exists already
+rm -rf /tmp/$NAME
 mkdir /tmp/$NAME
 mkdir /tmp/$NAME
+# clean stuff up first
+cd ..;make uberclean
 # sync the stuff to a working directory
 # sync the stuff to a working directory
-rsync -a ../ /tmp/$NAME/ --exclude=.hg* --delete
+rsync -a . /tmp/$NAME/ --exclude=.project --exclude=.cproject --exclude=.hg* --exclude=.git* --exclude=*.rej --delete
 cd /tmp/
 cd /tmp/
-tar -czf /tmp/$NAME.tgz $NAME
+echo "### creating /tmp/$NAME.tar.gz"
+tar -czf /tmp/$NAME.tar.gz $NAME
+md5sum /tmp/$NAME.tar.gz
+echo "### creating /tmp/$NAME.tar.bz2"
+tar -cjf /tmp/$NAME.tar.bz2 $NAME
+md5sum /tmp/$NAME.tar.bz2
 #clean up
 rm -rf /tmp/$NAME
 #clean up
 rm -rf /tmp/$NAME