dnl
dnl
dnl
-AC_INIT(Squid Web Proxy, 3.HEAD-CVS, http://www.squid-cache.org/bugs/, squid)
+AC_INIT(Squid Web Proxy, 3.HEAD-BZR, http://www.squid-cache.org/bugs/, squid)
AC_PREREQ(2.52)
AM_CONFIG_HEADER(include/autoconf.h)
AC_CONFIG_AUX_DIR(cfgaux)
echo "Usage: $0 revision [destination]"
exit 1
fi
-package=squid
+# VCS details
module=squid3
+BZRROOT=${BZRROOT:-/bzr}
+
+# infer tags from command line details
+package=squid
rev=`echo $1 | sed -e "s/^${package}-//"`
name=${package}-${rev}
tag=`echo ${name} | tr a-z.- A-Z__`
tmpdir=${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 $module
+bzr export $tmpdir $BZRROOT/$module/tags/$tag || exit 1
if [ ! -f $tmpdir/configure ]; then
echo "ERROR! Tag $tag not found in $module"
fi
cd $tmpdir
-eval `grep "^ *VERSION=" configure | sed -e 's/-CVS//'`
+eval `grep "^ *VERSION=" configure | sed -e 's/-BZR//'`
eval `grep "^ *PACKAGE=" configure`
if [ ${name} != ${PACKAGE}-${VERSION} ]; then
- echo "ERROR! The version numbers does not match!"
+ echo "ERROR! The tag and configure version numbers do not match!"
echo "${name} != ${PACKAGE}-${VERSION}"
exit 1
fi
RELEASE=`echo $VERSION | cut -d. -f1,2 | cut -d- -f1`
ed -s configure.in <<EOS
-g/${VERSION}-CVS/ s//${VERSION}/
+g/${VERSION}-BZR/ s//${VERSION}/
w
EOS
ed -s configure <<EOS
-g/${VERSION}-CVS/ s//${VERSION}/
+g/${VERSION}-BZR/ s//${VERSION}/
w
EOS
ed -s include/version.h <<EOS
#!/bin/sh -e
+
if [ $# -gt 1 ]; then
echo "Usage: $0 [branch]"
+ echo "Where [branch] is the path under /bzr/ to the branch to snapshot."
exit 1
fi
+# VCS details
module=squid3
-tag=${1:-HEAD}
+BZRROOT=${BZRROOT:-/bzr}
+
+# generate a tarball name from the branch ($1) note that trunk is at
+# /bzr/trunk, but we call it HEAD for consistency with CVS (squid 2.x), and
+# branches are in /bzr/branches/ but we don't want 'branches/' in the tarball
+# name so we strip that.
+tag="HEAD"
+branchpath=${1:-trunk}
+if [ "trunk" != "$branchpath" ]; then
+ tag=`echo $branchpath | sed -e "s/^branches\///"`
+fi
startdir=$PWD
date=`env TZ=GMT date +%Y%m%d`
tmpdir=${TMPDIR:-${PWD}}/${module}-${tag}-mksnapshot
-CVSROOT=${CVSROOT:-/server/cvs-server/squid}
-export CVSROOT
-
rm -rf $tmpdir
trap "rm -rf $tmpdir" 0
rm -f ${tag}.out
-cvs -Q export -d $tmpdir -r $tag $module
+bzr export $tmpdir $BZRROOT/$branchpath || exit 1
if [ ! -f $tmpdir/configure ]; then
echo "ERROR! Tag $tag not found in $module"
fi
cd $tmpdir
-eval `grep "^ *VERSION=" configure | sed -e 's/-CVS//'`
+eval `grep "^ *VERSION=" configure | sed -e 's/-BZR//'`
eval `grep "^ *PACKAGE=" configure`
ed -s configure.in <<EOS
-g/${VERSION}-CVS/ s//${VERSION}-${date}/
+g/${VERSION}-BZR/ s//${VERSION}-${date}/
w
EOS
ed -s configure <<EOS
-g/${VERSION}-CVS/ s//${VERSION}-${date}/
+g/${VERSION}-BZR/ s//${VERSION}-${date}/
w
EOS