]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- escape special characters when looking for a tag
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Mon, 5 Sep 2011 13:46:01 +0000 (13:46 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    builder.sh -> 1.651

builder.sh

index 6f138f36fd386f60cb62074f4b2c45b401b2999c..6125a34659a5802810cfa5db9ba313efbdc62067 100644 (file)
@@ -1308,6 +1308,9 @@ is_tag_a_branch() {
        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 @@ case "$COMMAND" in
                # ./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
This page took 0.049513 seconds and 4 git commands to generate.