From fbb0945bfb6a9535dc42a120466b44c0b39c915d Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Fri, 25 Jul 2014 14:09:06 -0400 Subject: 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 --- scripts/makepkg.sh.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index d0c5a6b1..f9e816fa 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -2912,8 +2912,8 @@ else exit 1 fi - if [[ ${BUILDFILE##*/} != "${BUILDFILE}" && ${BUILDFILE} != "${startdir}/${BUILDFILE##*/}" ]]; then - error "$(gettext "%s must be in the build directory.")" "$BUILDFILE" + if [[ ! $BUILDFILE -ef $PWD/${BUILDFILE##*/} ]]; then + error "$(gettext "%s must be in the current working directory.")" "$BUILDFILE" exit 1 fi -- cgit v1.2.3-70-g09d2