From 2d8d8af915d352b61178a981603360c27a3899f2 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 12 Jun 2018 07:28:51 -0400 Subject: 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 Signed-off-by: Allan McRae --- scripts/wrapper.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/wrapper.sh.in') 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@ "$@" -- cgit v1.2.3-54-g00ecf