]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
A small script for generating snapshot releases
authorhno <>
Thu, 27 Dec 2001 19:57:38 +0000 (19:57 +0000)
committerhno <>
Thu, 27 Dec 2001 19:57:38 +0000 (19:57 +0000)
mksnapshot.sh [new file with mode: 0755]

diff --git a/mksnapshot.sh b/mksnapshot.sh
new file mode 100755 (executable)
index 0000000..e345a7a
--- /dev/null
@@ -0,0 +1,41 @@
+#!/bin/sh -e
+if [ $# -gt 1 ]; then
+       echo "Usage: $0 [branch]"
+       exit 1
+fi
+package=squid
+tag=${1:-HEAD}
+startdir=$PWD
+date=`date +%Y%m%d`
+
+tmpdir=$PWD/${package}-${tag}-mksnapshot
+
+CVSROOT=${CVSROOT:-/server/cvs-server/squid}
+export CVSROOT
+
+rm -rf $tmpdir
+trap "rm -rf $tmpdir" 0
+
+cvs -Q export -d $tmpdir -r $tag $package
+if [ ! -f $tmpdir/configure ]; then
+       echo "ERROR! Tag $tag not found in $package"
+fi
+
+cd $tmpdir
+eval CVS`grep ^VERSION= configure`
+VERSION=`echo $CVSVERSION | sed -e 's/-CVS//'`
+eval `grep ^PACKAGE= configure`
+ed -s configure.in <<EOS
+g/${CVSVERSION}/ s//${VERSION}-${date}/
+w
+EOS
+ed -s configure <<EOS
+g/${CVSVERSION}/ s//${VERSION}-${date}/
+w
+EOS
+
+./configure --silent
+make dist
+
+cd $startdir
+cp -p $tmpdir/${PACKAGE}-${VERSION}-${date}.tar.gz .