packages: builder - try handling subver in set_version()
glen
glen at pld-linux.org
Fri Aug 20 12:23:20 CEST 2010
Author: glen Date: Fri Aug 20 10:23:20 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- try handling subver in set_version()
---- Files affected:
packages:
builder (1.624 -> 1.625)
---- Diffs:
================================================================
Index: packages/builder
diff -u packages/builder:1.624 packages/builder:1.625
--- packages/builder:1.624 Thu Aug 19 14:57:42 2010
+++ packages/builder Fri Aug 20 12:23:14 2010
@@ -1415,10 +1415,19 @@
set_version() {
local specfile="$1"
- local ver="$2"
- local newver="$3"
+ local ver="$2" subver=$ver
+ local newver="$3" newsubver=$newver
+
+ # try handling subver, everything that's not numeric-dotted in version
+ if grep -Eq '%define\s+subver' $specfile; then
+ subver=$(echo "$ver" | sed -re 's,^[0-9.]+,,')
+ ver=${ver%$subver}
+ newsubver=$(echo "$newver" | sed -re 's,^[0-9.]+,,')
+ newver=${newver%$newsubver}
+ fi
sed -i -e "
s/^\(%define[ \t]\+_\?ver[ \t]\+\)$ver\$/\1$newver/
+ s/^\(%define[ \t]\+subver[ \t]\+\)$subver\$/\1$newsubver/
s/^\(Version:[ \t]\+\)$ver\$/\1$newver/
" $specfile
}
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/builder?r1=1.624&r2=1.625&f=u
More information about the pld-cvs-commit
mailing list