summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2008-10-28 21:22:05 +1000
committerDan McGee <dan@archlinux.org>2008-10-28 21:46:40 -0500
commit1e656c0a6a7f2dcf5dc40f1b1027161847b967b4 (patch)
tree7ab5b1b2f167c042484c2003d55f1f078152d0b9 /scripts
parent50e3dc02bf1a99ec040988fde1425adba67da4cb (diff)
downloadpacman-1e656c0a6a7f2dcf5dc40f1b1027161847b967b4.tar.xz
makepkg: fix updating PKGBUILD when building SCM packages
Fixes a bug and resets pkgrel to 1 when bumping pkgver Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in4
1 files changed, 3 insertions, 1 deletions
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