Added another safety option to bash, moved bash invocation to a separate file
This commit is contained in:
parent
24d1285603
commit
d5f1c26226
3
Makefile
3
Makefile
|
@ -7,7 +7,8 @@ COMMIT_TIMESTAMP_ISO_8601 = $$(git log -1 --pretty=format:%ad --date=iso8601-str
|
||||||
####################################
|
####################################
|
||||||
|
|
||||||
MAKEFLAGS = --warn-undefined-variables
|
MAKEFLAGS = --warn-undefined-variables
|
||||||
SHELL = bash -euET -o pipefail -c
|
SHELL = ${CURDIR}/utils/safe-bash.sh
|
||||||
|
# utils/safe-bash.sh
|
||||||
.SECONDEXPANSION:
|
.SECONDEXPANSION:
|
||||||
|
|
||||||
Makefiles = Makefile Makefile.example-os Makefile.test-example-os
|
Makefiles = Makefile Makefile.example-os Makefile.test-example-os
|
||||||
|
|
5
utils/safe-bash.sh
Executable file
5
utils/safe-bash.sh
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if test "$#" -gt 1 -a "$1" = "-c"; then shift; fi
|
||||||
|
bash -euET -o pipefail -c 'trap "kill $$" ERR; '"$1"
|
||||||
|
exit $?
|
Loading…
Reference in New Issue
Block a user