]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix snapshot brach names
authorHenrik Nordstrom <hno@squid-cache.org>
Thu, 13 Mar 2008 19:05:54 +0000 (13:05 -0600)
committerHenrik Nordstrom <hno@squid-cache.org>
Thu, 13 Mar 2008 19:05:54 +0000 (13:05 -0600)
mksnapshot-cron.sh
mksnapshot.sh

index d0ea4d55f5b61be048e41d6aaabaea9b9811ebe6..9359fd2598474b85ee6c5efa534c3747d88aba86 100755 (executable)
@@ -27,7 +27,8 @@ make_snapshot()
   ver=$4
   save=${5:-3}
   dst=$versions/$dir/$ver
-  $mksnap $tag 2>&1 | grep -v "set owner/group"
+  out=${5:-`basename $tag`}
+  $mksnap $tag $out 2>&1 | grep -v "set owner/group"
   for file in `cat $tag.out` ; do
     case $file in
     *-cfgman.tar.gz)
index 300f461cd77f3f58f0144a7112fb72ed2aa06536..050e258b4c5022ce1939285583f84fc315a80c16 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh -e
 
-if [ $# -gt 1 ]; then
+if [ $# -lt 1 ]; then
        echo "Usage: $0 [branch]"
        echo "Where [branch] is the path under /bzr/ to the branch to snapshot."
        exit 1
@@ -13,11 +13,8 @@ BZRROOT=${BZRROOT:-/bzr}
 # /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
+tag=${2:-`basename $branchpath`}
 startdir=$PWD
 date=`env TZ=GMT date +%Y%m%d`
 
@@ -49,18 +46,18 @@ make -s dist-all
 
 basetarball=/server/httpd/htdocs/squid-cache.org/Versions/v`echo $VERSION | cut -d. -f1`/`echo $VERSION | cut -d. -f-2|cut -d- -f1`/${PACKAGE}-${VERSION}.tar.bz2
 if (echo $VERSION | grep PRE) || (echo $VERSION | grep STABLE); then
-       echo "Differences from ${PACKAGE}-${VERSION} to ${PACKAGE}-${VERSION}-${date}" >${PACKAGE}-${VERSION}-${date}.diff
        if [ -f $basetarball ]; then
                tar jxf ${PACKAGE}-${VERSION}-${date}.tar.bz2
                tar jxf $basetarball
+               echo "Differences from ${PACKAGE}-${VERSION} to ${PACKAGE}-${VERSION}-${date}" >${PACKAGE}-${VERSION}-${date}.diff
                diff -ruN ${PACKAGE}-${VERSION} ${PACKAGE}-${VERSION}-${date} >>${PACKAGE}-${VERSION}-${date}.diff || true
        else
-               cvs -q rdiff -u -r SQUID_`echo $VERSION | tr .- __` -r $tag $module >>${PACKAGE}-${VERSION}-${date}.diff || true
+               #cvs -q rdiff -u -r SQUID_`echo $VERSION | tr .- __` -r $tag $module >>${PACKAGE}-${VERSION}-${date}.diff || true
        fi
 elif [ -f STABLE_BRANCH ]; then
-       stable=`cat STABLE_BRANCH`
-       echo "Differences from ${stable} to ${PACKAGE}-${VERSION}-${date}" >${PACKAGE}-${VERSION}-${date}.diff
-       cvs -q rdiff -u -r $stable -r $tag $module >>${PACKAGE}-${VERSION}-${date}.diff
+       #stable=`cat STABLE_BRANCH`
+       #echo "Differences from ${stable} to ${PACKAGE}-${VERSION}-${date}" >${PACKAGE}-${VERSION}-${date}.diff
+       #cvs -q rdiff -u -r $stable -r $tag $module >>${PACKAGE}-${VERSION}-${date}.diff
 fi
 
 cd $startdir