packages: builder - escape special characters when looking for a tag
arekm
arekm at pld-linux.org
Mon Sep 5 15:46:07 CEST 2011
Author: arekm Date: Mon Sep 5 13:46:07 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- escape special characters when looking for a tag
---- Files affected:
packages:
builder (1.650 -> 1.651)
---- Diffs:
================================================================
Index: packages/builder
diff -u packages/builder:1.650 packages/builder:1.651
--- packages/builder:1.650 Wed Aug 24 11:42:04 2011
+++ packages/builder Mon Sep 5 15:46:01 2011
@@ -1308,6 +1308,9 @@
fi
TAG=$1
+ # escape some regexp characters if part of TAG
+ TAG=$(echo "$TAG" | sed -e 's#\([\+\*\.]\)#\\\1#g')
+
cd "$PACKAGE_DIR"
$CVS_COMMAND status -v $SPECFILE | grep -Eiq "${TAG}.+(branch: [0-9.]+)"
@@ -2546,6 +2549,8 @@
# ./builder -bs test.spec -r AC-branch -Tp auto-ac- -tt
if [ -n "$TEST_TAG" ]; then
local TAGVER=`make_tagver`
+ # escape some regexp characters if part of TAGVER
+ TAGVER=$(echo "$TAGVER" | sed -e 's#\([\+\*\.]\)#\\\1#g')
echo "Searching for tag $TAGVER..."
TAGREL=$($CVS_COMMAND status -v $SPECFILE | grep -E "^[[:space:]]*${TAGVER}[[[:space:]]" | sed -e 's#.*(revision: ##g' -e 's#).*##g')
if [ -n "$TAGREL" ]; then
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/builder?r1=1.650&r2=1.651&f=u
More information about the pld-cvs-commit
mailing list