packages: vim/autoup.sh - cvs up first

glen glen at pld-linux.org
Mon Jan 24 13:51:22 CET 2011


Author: glen                         Date: Mon Jan 24 12:51:22 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- cvs up first

---- Files affected:
packages/vim:
   autoup.sh (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: packages/vim/autoup.sh
diff -u packages/vim/autoup.sh:1.1 packages/vim/autoup.sh:1.2
--- packages/vim/autoup.sh:1.1	Mon Dec  6 14:32:59 2010
+++ packages/vim/autoup.sh	Mon Jan 24 13:51:17 2011
@@ -32,18 +32,22 @@
 	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.??? || :
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/vim/autoup.sh?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list