makepkg: remove sourcing PKGBUILD from stdin
Using PKGBUILDs from stdin means that we can not use pkgver() in packages. Given we have the "-p" option to pass any file to makepkg and passing a PKGBUILD in the form "cat foo | makepkg" does not work, this feature is unneeded. Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
296e630edd
commit
28dd29dedb
|
@ -2760,14 +2760,8 @@ unset makedepends optdepends options noextract
|
|||
|
||||
BUILDFILE=${BUILDFILE:-$BUILDSCRIPT}
|
||||
if [[ ! -f $BUILDFILE ]]; then
|
||||
if [[ -t 0 ]]; then
|
||||
error "$(gettext "%s does not exist.")" "$BUILDFILE"
|
||||
exit 1
|
||||
else
|
||||
# PKGBUILD passed through a pipe
|
||||
BUILDFILE=/dev/stdin
|
||||
source_safe "$BUILDFILE"
|
||||
fi
|
||||
error "$(gettext "%s does not exist.")" "$BUILDFILE"
|
||||
exit 1
|
||||
else
|
||||
if [[ $(<"$BUILDFILE") = *$'\r'* ]]; then
|
||||
error "$(gettext "%s contains %s characters and cannot be sourced.")" "$BUILDFILE" "CRLF"
|
||||
|
|
Loading…
Reference in New Issue