mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-10 19:45:01 -05: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:
parent
9506409c3f
commit
fbb0945bfb
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user