From 1e656c0a6a7f2dcf5dc40f1b1027161847b967b4 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 28 Oct 2008 21:22:05 +1000 Subject: makepkg: fix updating PKGBUILD when building SCM packages Fixes a bug and resets pkgrel to 1 when bumping pkgver Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- scripts/makepkg.sh.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 1d70f39b..46173a77 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1069,6 +1069,7 @@ devel_check() { if [ "$newpkgver" != "" ]; then msg2 "$(gettext "Version found: %s")" "$newpkgver" pkgver=$newpkgver + pkgrel=1 fi else @@ -1088,8 +1089,9 @@ devel_update() { # _foo=pkgver # if [ "$newpkgver" != "" ]; then - if [ "newpkgver" != "$pkgver" ]; then + if [ "$newpkgver" != "$pkgver" ]; then sed -i "s/^pkgver=[^ ]*/pkgver=$newpkgver/" ./$BUILDSCRIPT + sed -i "s/^pkgrel=[^ ]*/pkgrel=1/" ./$BUILDSCRIPT source $BUILDSCRIPT fi fi -- cgit v1.2.3-70-g09d2