1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

makepkg: improve check and error message for buildfile location

The documentation very clearly states that the buildfile has to be in
$PWD, but the error thrown by makepkg reference some mysterious "build
directory". Simplify this check so that we more directly check that the
file being referred to is in fact in our $PWD. Revise the error message
when the check fails to more plainly point out the problem.

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Dave Reisner 2014-07-25 14:09:06 -04:00 committed by Allan McRae
parent 9506409c3f
commit fbb0945bfb

View File

@ -2912,8 +2912,8 @@ else
exit 1 exit 1
fi fi
if [[ ${BUILDFILE##*/} != "${BUILDFILE}" && ${BUILDFILE} != "${startdir}/${BUILDFILE##*/}" ]]; then if [[ ! $BUILDFILE -ef $PWD/${BUILDFILE##*/} ]]; then
error "$(gettext "%s must be in the build directory.")" "$BUILDFILE" error "$(gettext "%s must be in the current working directory.")" "$BUILDFILE"
exit 1 exit 1
fi fi