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:
parent
cd51abf0c8
commit
8d33dcb81c
1 changed files with 9 additions and 3 deletions
|
@ -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,11 +1108,13 @@ devel_update() {
|
|||
#
|
||||
if [ "$newpkgver" != "" ]; then
|
||||
if [ "$newpkgver" != "$pkgver" ]; then
|
||||
if [ -f "./$BUILDSCRIPT" ]; then
|
||||
sed -i "s/^pkgver=[^ ]*/pkgver=$newpkgver/" ./$BUILDSCRIPT
|
||||
sed -i "s/^pkgrel=[^ ]*/pkgrel=1/" ./$BUILDSCRIPT
|
||||
source $BUILDSCRIPT
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
usage() {
|
||||
|
|
Loading…
Add table
Reference in a new issue