]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
A silly little script for generating releases from CVS.
authorhno <>
Thu, 27 Dec 2001 06:10:43 +0000 (06:10 +0000)
committerhno <>
Thu, 27 Dec 2001 06:10:43 +0000 (06:10 +0000)
 1. Fetches a pure copy from CVS
 2. Verifies version numbers etc
 3. Mangles the VERSION tag (removes -CVS)
 4. Generates a distribution tarball by using the automake mechanism
 5. Saves the generated distribution tarball
 6. Cleans up after itself

Will add snapshot capabilities shortly

mkrelease.sh [new file with mode: 0755]

diff --git a/mkrelease.sh b/mkrelease.sh
new file mode 100755 (executable)
index 0000000..19be4d1
--- /dev/null
@@ -0,0 +1,46 @@
+#!/bin/sh -e
+if [ $# -ne 1 ]; then
+       echo "Usage: $0 revision"
+       exit 1
+fi
+package=squid
+rev=`echo $1 | sed -e "s/^${package}-//"`
+name=${package}-${rev}
+tag=`echo ${name} | tr a-z.- A-Z__`
+startdir=$PWD
+
+tmpdir=$PWD/${name}-mkrelease
+
+CVSROOT=${CVSROOT:-/server/cvs-server/squid}
+export CVSROOT
+
+rm -rf $name.tar.gz $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 `grep ^VERSION= configure | sed -e 's/-CVS$//'`
+eval `grep ^PACKAGE= configure`
+if [ ${name} != ${PACKAGE}-${VERSION} ]; then
+       echo "ERROR! The version numbers does not match!"
+       echo "${name} != ${PACKAGE}-${VERSION}"
+       exit 1
+fi
+ed -s configure.in <<EOS
+g/${VERSION}-CVS/ s//${VERSION}/
+w
+EOS
+ed -s configure <<EOS
+g/${VERSION}-CVS/ s//${VERSION}/
+w
+EOS
+
+./configure --silent
+make dist
+
+cd $startdir
+cp -p $tmpdir/${name}.tar.gz .