If PKGBUILD (BUILDSCRIPT) is not found, test for information from a pipe and use that. Fixes FS#9187.
Signed-off-by: Allan McRae allan@archlinux.org --- scripts/makepkg.sh.in | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index f5caa12..627001a 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1358,8 +1358,13 @@ unset replaces depends conflicts backup source install build makedepends unset optdepends options noextract
if [ ! -f "$BUILDSCRIPT" ]; then - error "$(gettext "%s does not exist.")" "$BUILDSCRIPT" - exit 1 + if [ -t 0 ]; then + error "$(gettext "%s does not exist.")" "$BUILDSCRIPT" + exit 1 + else + # PKGBUILD passed through a pipe + BUILDSCRIPT=/dev/stdin + fi fi
source "$BUILDSCRIPT"
On Tue, Oct 28, 2008 at 11:31 PM, Allan McRae allan@archlinux.org wrote:
If PKGBUILD (BUILDSCRIPT) is not found, test for information from a pipe and use that. Fixes FS#9187.
Signed-off-by: Allan McRae allan@archlinux.org
scripts/makepkg.sh.in | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index f5caa12..627001a 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1358,8 +1358,13 @@ unset replaces depends conflicts backup source install build makedepends unset optdepends options noextract
if [ ! -f "$BUILDSCRIPT" ]; then
error "$(gettext "%s does not exist.")" "$BUILDSCRIPT"
exit 1
if [ -t 0 ]; then
error "$(gettext "%s does not exist.")" "$BUILDSCRIPT"
exit 1
else
# PKGBUILD passed through a pipe
BUILDSCRIPT=/dev/stdin
fi
fi
source "$BUILDSCRIPT"
Looks good, pulled to my master branch.
-Dan
pacman-dev@lists.archlinux.org