]> git.pld-linux.org Git - packages/rpm-build-tools.git/blobdiff - builder.sh
- updated
[packages/rpm-build-tools.git] / builder.sh
index c771e9a9186d7ed881d72da467b42453c1032b40..6125a34659a5802810cfa5db9ba313efbdc62067 100644 (file)
@@ -785,7 +785,7 @@ get_spec() {
                if [ "$SYMLINK_TOOLS" != "no" ]; then
                        for a in dropin md5 adapter builder {relup,compile,repackage,rsync,pearize}.sh pldnotify.awk; do
                                [ -f $a ] || continue
-                               ln -sf ../$a $ASSUMED_NAME
+                               ln -s ../$a $ASSUMED_NAME
                                cvsignore_df $a
                        done
                fi
@@ -831,9 +831,12 @@ find_mirror() {
 
 # Warning: unpredictable results if same URL used twice
 src_no() {
+       local file="$1"
+       # escape some regexp characters if part of file name
+       file=$(echo "$file" | sed -e 's#\([\+\*\.]\)#\\\1#g')
        cd $PACKAGE_DIR
        rpm_dump | \
-       grep -E "(SOURCE|PATCH)URL[0-9]*[       ]*$1""[         ]*$" | \
+       grep -E "(SOURCE|PATCH)URL[0-9]*[       ]*${file}""[    ]*$" | \
        sed -e 's/.*\(SOURCE\|PATCH\)URL\([0-9][0-9]*\).*/\1\2/' | \
        head -n 1 | tr OURCEATH ourceath | xargs
 }
@@ -1305,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.]+)"
@@ -2543,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.127644 seconds and 4 git commands to generate.