index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Allan McRae <allan@archlinux.org> | 2008-10-28 22:04:39 +1000 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-10-28 22:33:58 -0500 |
commit | 8d33dcb81c464f5e42d83078472bc509e087dd62 (patch) | |
tree | 2123ddf121233940cc03fe21016ed514ed1a6c1d | |
parent | cd51abf0c8d04c72cc85b28cd45b33b9020c661e (diff) |
-rw-r--r-- | scripts/makepkg.sh.in | 12 |
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 266e214f..687897ee 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1037,6 +1037,10 @@ devel_check() { if [ "$HOLDVER" = "1" ]; then return fi + # Cannot update pkgver/pkgrel if reading PKGBUILD from pipe + if [ ! -f "./$BUILDSCRIPT" ]; then + return + fi if [ "$FORCE_VER" = "" ]; then # Check if this is a svn/cvs/etc PKGBUILD; set $newpkgver if so. # This will only be used on the first call to makepkg; subsequent @@ -1104,9 +1108,11 @@ devel_update() { # if [ "$newpkgver" != "" ]; then if [ "$newpkgver" != "$pkgver" ]; then - sed -i "s/^pkgver=[^ ]*/pkgver=$newpkgver/" ./$BUILDSCRIPT - sed -i "s/^pkgrel=[^ ]*/pkgrel=1/" ./$BUILDSCRIPT - source $BUILDSCRIPT + if [ -f "./$BUILDSCRIPT" ]; then + sed -i "s/^pkgver=[^ ]*/pkgver=$newpkgver/" ./$BUILDSCRIPT + sed -i "s/^pkgrel=[^ ]*/pkgrel=1/" ./$BUILDSCRIPT + source $BUILDSCRIPT + fi fi fi } |