1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-23 00:08:50 -05:00

makepkg: enable passing PKGBUILD from pipe

Do not attemp to update pkgver/pkgrel when reading a SCM based PKGBUILD
from a pipe.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Allan McRae 2008-10-28 22:04:39 +10:00 committed by Dan McGee
parent cd51abf0c8
commit 8d33dcb81c

View File

@ -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
}