summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2014-07-25 14:09:06 -0400
committerAllan McRae <allan@archlinux.org>2014-08-03 18:46:32 +1000
commitfbb0945bfb6a9535dc42a120466b44c0b39c915d (patch)
tree496a6092267af90db5aae68dcb4fa455ebdd57d1
parent9506409c3fa5e5df3a70ba9b814ce0032ed24196 (diff)
downloadpacman-fbb0945bfb6a9535dc42a120466b44c0b39c915d.tar.xz
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>
-rw-r--r--scripts/makepkg.sh.in4
1 files 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