]> git.pld-linux.org Git - packages/vim.git/commitdiff
- cvs up first
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 24 Jan 2011 12:51:17 +0000 (12:51 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    autoup.sh -> 1.2

autoup.sh

index 79bba53b26933aa8fcaafcc9cb7a371ab55d4896..c0fe715fc8c770def92af4935fc16c733fa7db46 100644 (file)
--- a/autoup.sh
+++ b/autoup.sh
@@ -32,19 +32,23 @@ else
        ver=$(curl -s $baseurl/MD5SUMS | grep -vF .gz | tail -n1 | awk '{print $2}')
 fi
 
+# cvs up specfile, rename in case of conflicts
+cvs up $specfile || { set -x; mv -b $specfile $specfile.old; }
+
 curpatch=$(awk '/^%define[     ]+patchlevel[   ]+/{print $NF}' $specfile)
 curver=$basever.$curpatch
 
 if [ "$curver" != "$ver" ]; then
        echo "Updating $specfile to $ver"
        patch=${ver#$basever.}
+       if [ -z "$patch" ]; then
+               echo >&2 "Will not set empty patchlevel"
+               exit 1
+       fi
        sed -i -e "
                s/^\(%define[ \t]\+patchlevel[ \t]\+\)[0-9]\+\$/\1$patch/
        " $specfile
 
-       # cvs up specfile, rename in case of conflicts
-       cvs up $specfile || { set -x; mv -b $specfile $specfile.old; };
-
        WGET_OPTS="-nv" ../builder -g $specfile
        cvs -Q add $basever.??? || :
 
This page took 0.127087 seconds and 4 git commands to generate.