-#!/bin/sh
+#!/bin/bash
#
# author: hackbard@hackdaworld.dyndns.org
#
# make a tarball from the hdw sources
if [ -z "$1" ] ; then
- version="0.3-dev"
+ version="cvs"
else
- version="$2"
+ version="$1"
fi
-d_tag=`date | awk '{ print $6 "-" $2 "-" $3 }'`
-c_tag=`date | awk '{ print $4 }' | sed 's/:/-/g'`
-tag="-${d_tag}-${c_tag}"
-[ -z "`echo $version | grep 'dev'`" ] && tag=""
+rm -f hdw-linux-${version}.tar.bz2
+rm -rf hdw-linux
-if [ -f hdw-linux-${version}${tag}* ] ; then
- echo "delete old tarball pls!"
- exit 1
-fi
-
-rm -rf hdw-linux-${version}
-cvs -d:pserver:anonymous@right-hand:/hdw-linux co hdw-linux-${version}
-cd hdw-linux-${version}
-rm -r CVS
-rm -r */CVS
-rm -r */*/CVS
-rm -r */*/*/CVS
-rm -r */*/*/*/CVS
-rm -r */*/*/*/*/CVS
+cvs -d:pserver:anonymous@right-hand:/hdw-linux co hdw-linux
+mv hdw-linux hdw-linux-${version} ; cd hdw-linux-${version}
+rm -rf CVS
+rm -rf */CVS
+rm -rf */*/CVS
+rm -rf */*/*/CVS
+rm -rf */*/*/*/CVS
+rm -rf */*/*/*/*/CVS
cd ..
-tar cvf hdw-linux-${version}${tag}.tar hdw-linux-${version}
-bzip2 hdw-linux-${version}${tag}.tar
-scp hdw-linux-${version}${tag}.tar.bz2 \
-right-hand:/chroot/www/htdocs/download/hdw-linux/hdw-linux-$version/snapshots/
-scp hdw-linux-${version}${tag}.tar.bz2 \
+tar cvf hdw-linux-${version}.tar hdw-linux-${version}
+bzip2 hdw-linux-${version}.tar
+scp hdw-linux-${version}.tar.bz2 \
+www.hackdaworld.dyndns.org:/chroot/www/htdocs/download/hdw-linux/hdw-linux-$version/snapshot/
+scp hdw-linux-${version}.tar.bz2 \
zirkelfr@everest.physik.uni-augsburg.de:~/public_html/download/hdw-linux/hdw-linux-${version}.tar.bz2
-#rm hdw-linux-${version}${tag}.tar.bz2
-rm -r hdw-linux-${version}
+rm -rf hdw-linux-${version}
echo "done"
-
-