]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Add a syntax check to the 'revision' arg of mkrelease.sh script
authorwessels <>
Fri, 31 Aug 2007 02:31:41 +0000 (02:31 +0000)
committerwessels <>
Fri, 31 Aug 2007 02:31:41 +0000 (02:31 +0000)
mkrelease.sh

index 79b22d4653f7a7ac1cbe82265ccce4fafb8941eb..1884bf7fe6b7994ef97637cb6a61efe397a87204 100755 (executable)
@@ -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}