Improve the manual page on the website.
[herrie-working.git] / createtar
blob679d41b7ed5363bd41007152bedcf86341ff6633
1 #!/bin/sh
3 set -e
5 if [ $# != 1 ]
6 then
7 echo "usage: $0 version"
8 exit 1
9 fi
11 FILEBASE="herrie-$1.tar"
12 DISTDIR="www/distfiles"
13 TARBZ2="$FILEBASE.bz2"
14 TARGZ="$FILEBASE.gz"
16 cd `dirname $0`
18 if [ -e $DISTDIR/$TARBZ2 -o -e $DISTDIR/$TARGZ ]
19 then
20 echo "file already exists"
21 exit 1
24 mkdir -p $DISTDIR
25 git archive --format=tar --prefix="herrie-$1/" HEAD:herrie |
26 bzip2 -9 > $DISTDIR/$TARBZ2
27 cd $DISTDIR
28 bzip2 -d < $TARBZ2 | gzip -9 > $TARGZ
30 for i in $TARBZ2 $TARGZ
32 md5 $i
33 sha256 $i
34 stat -f "SIZE ($i) = %z" $i
35 done
37 echo "don't forget to run ./updatestuff!"