From 8d33dcb81c464f5e42d83078472bc509e087dd62 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 28 Oct 2008 22:04:39 +1000 Subject: 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 Signed-off-by: Dan McGee --- scripts/makepkg.sh.in | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'scripts') 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 } -- cgit v1.2.3-70-g09d2