Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/wrapper.sh.in
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2018-06-12 07:28:51 -0400
committerAllan McRae <allan@archlinux.org>2018-08-10 15:20:40 +1000
commit2d8d8af915d352b61178a981603360c27a3899f2 (patch)
tree70ea242e0c91924fb6cd7fcb6e0987cb0f3413fb /scripts/wrapper.sh.in
parent7d05ffceaf9161a6572505d25b5017e1eb33bf0e (diff)
scripts: pass on options such as set -x to child processes
When re-running makepkg for fakeroot, if `bash -x makepkg` was used this is lost. Fix by encoding the current set of options explicitly in the invocation, both for makepkg and for the wrapper used to test scripts inside the source tree. Also change to use ${BASH_SOURCE[0]} instead of $0 as the latter can be anything the parent process wants, while the former is explicitly set by bash itself to the filepath of the script. See http://mywiki.wooledge.org/BashFAQ/028 Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts/wrapper.sh.in')
-rw-r--r--scripts/wrapper.sh.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/wrapper.sh.in b/scripts/wrapper.sh.in
index 94c7e0ed..f9480ea4 100644
--- a/scripts/wrapper.sh.in
+++ b/scripts/wrapper.sh.in
@@ -20,4 +20,4 @@
DIR="@PWD@"
-LIBRARY="$DIR"/libmakepkg exec "$DIR"/.lib/@PROGNAME@ "$@"
+LIBRARY="$DIR"/libmakepkg exec bash -$- "$DIR"/.lib/@PROGNAME@ "$@"