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

makepkg: actually fix passing PKGBUILD from pipe

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>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Allan McRae 2008-10-29 14:21:28 +10:00 committed by Dan McGee
parent 8d33dcb81c
commit c4b9991258

View File

@ -1347,8 +1347,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"