From: wessels <> Date: Fri, 31 Aug 2007 02:31:41 +0000 (+0000) Subject: Add a syntax check to the 'revision' arg of mkrelease.sh script X-Git-Tag: SQUID_3_0_PRE7~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fe4990f78338b595e3dc905688cd27dbfaa6e486;p=thirdparty%2Fsquid.git Add a syntax check to the 'revision' arg of mkrelease.sh script --- diff --git a/mkrelease.sh b/mkrelease.sh index 79b22d4653..1884bf7fe6 100755 --- a/mkrelease.sh +++ b/mkrelease.sh @@ -12,6 +12,16 @@ startdir=$PWD/ dst=${2:-$PWD}/ RELEASE_TIME=`date +%s` +# DPW 2007-08-30 +# +# check that $rev has the right syntax +# +checkrev=`expr $rev : '\([0-9]\.[0-9]\.[A-Z0-9]*\)'` +if test "$rev" != "$checkrev" ; then + echo "revision '$rev' has incorrect syntax. Should be like '3.0.STABLE1'" + exit 1; +fi + tmpdir=${TMPDIR:-${PWD}}/${name}-mkrelease CVSROOT=${CVSROOT:-/server/cvs-server/squid}