]> jfr.im git - solanum.git/blobdiff - scripts/makerelease.sh
Fix potential buffer-overflow from malformed RSFNC request.
[solanum.git] / scripts / makerelease.sh
index 7b3fc276996c1143bca60cedcf787243e22919ce..106dd8838d3e3054351a1f40c2fa51e2e299b22b 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # mkrelease.sh: Creates a release suitable for distfiles.atheme.org.
 #
-# Copyright (c) 2007 atheme.org
+# Copyright (c) 2007, 2011 atheme.org
 #
 # Permission to use, copy, modify, and/or distribute this software for
 # any purpose with or without fee is hereby granted, provided that the above
@@ -30,7 +30,7 @@ if [ "x$2" = "x--automatic" ]; then
        AUTOMATIC="yes"
 fi
 
-TIP=`hg parents --template "{rev}:{node|short}"`
+TIP=`git log -1 --pretty=oneline | cut -d" " -f1`
 
 WRKDIR=`pwd`
 
@@ -43,10 +43,14 @@ echo "Making release named $RELEASENAME (tip $TIP)"
 
 echo
 echo "Building root: $RELEASENAME/"
-hg archive $RELEASENAME
+cd ..
+git archive --format=tar --prefix=$RELEASENAME/ HEAD | gzip >scripts/$RELEASENAME-working.tar.gz
+cd $WRKDIR
+tar -xzvf $RELEASENAME-working.tar.gz
 cd $RELEASENAME
 sh autogen.sh
 rm -rf autogen.sh autom4te.cache
+rm -rf .gitignore
 
 # Run application specific instructions here.
 if [ -x "$WRKDIR/application.sh" ]; then
@@ -56,10 +60,12 @@ fi
 cd ..
 
 echo "Building $RELEASENAME.tgz from $RELEASENAME/"
-tar zcf $RELEASENAME.tgz $RELEASENAME/
+tar zcf $RELEASENAME.tar.gz $RELEASENAME/
 
 echo "Building $RELEASENAME.tbz2 from $RELEASENAME/"
-tar jcf $RELEASENAME.tbz2 $RELEASENAME/
+tar jcf $RELEASENAME.tar.bz2 $RELEASENAME/
+
+rm $RELEASENAME-working.tar.gz
 
 PUBLISH="yes"
 
@@ -95,6 +101,6 @@ fi
 
 echo
 echo "Done. If you have any bugs to report, report them against"
-echo "the distfiles.atheme.org component at http://bugzilla.atheme.org"
+echo "the distfiles.atheme.org component at http://jira.atheme.org"
 echo "Thanks!"
 echo