Permalink
Fetching contributors…
Cannot retrieve contributors at this time
executable file 38 lines (29 sloc) 616 Bytes
#!/bin/sh
set -e
if [ $# != 1 ]
then
echo "usage: $0 version"
exit 1
fi
FILEBASE="herrie-$1.tar"
DISTDIR="www/distfiles"
TARBZ2="$FILEBASE.bz2"
TARGZ="$FILEBASE.gz"
cd `dirname $0`
if [ -e $DISTDIR/$TARBZ2 -o -e $DISTDIR/$TARGZ ]
then
echo "file already exists"
exit 1
fi
mkdir -p $DISTDIR
git archive --format=tar --prefix="herrie-$1/" HEAD:herrie |
bzip2 -9 > $DISTDIR/$TARBZ2
cd $DISTDIR
bzip2 -d < $TARBZ2 | gzip -9 > $TARGZ
for i in $TARBZ2 $TARGZ
do
md5 $i | sed -e 's| | |'
sha256 $i
stat -f "SIZE ($i) = %z" $i
done | sed -e 's|\.gz)|.gz )|'
echo "don't forget to run ./updatestuff!"