From 2401468f5104fa6794589381cef9e970692d95e8 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sun, 25 May 2014 13:53:19 +1000 Subject: makepkg: Force buildscripts to be in startdir We expect all source file to lie in $startdir. However, using "makepkg -p " can currently allows people to specify buildscripts in other directories. This results in confusion about where other sources should lie (in startdir or in the directory that the buildscript is in). Explicitly disable using -p for files in other directories to avoid this issue. Fixes FS#40293. Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 96e53499..de92e933 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -2906,6 +2906,11 @@ else exit 1 fi + if [[ ${BUILDFILE##*/} != "${BUILDFILE}" && ${BUILDFILE} != "${startdir}/${BUILDFILE##*/}" ]]; then + error "$(gettext "%s must be in the build directory.")" "$BUILDFILE" + exit 1 + fi + if [[ ${BUILDFILE:0:1} != "/" ]]; then BUILDFILE="$startdir/$BUILDFILE" fi -- cgit v1.2.3-24-g4f1b