aports/testing/roundup/roundup-fix-busybox-shell-opts.patch
2015-11-04 09:49:39 +00:00

20 lines
890 B
Diff

diff --git a/roundup.sh b/roundup.sh
index d7465dc..38d7efe 100755
--- a/roundup.sh
+++ b/roundup.sh
@@ -258,9 +258,11 @@ do
# exit subshell with return code of last failing command. This
# is needed to see the return code 253 on failed assumptions.
- # But, only do this if the error handling is activated.
- set -E
- trap 'rc=$?; set +x; set -o | grep "errexit.*on" >/dev/null && exit $rc' ERR
+ # But, only do this if the error handling is activated and only if the shell supports it
+ if set -o | grep "^errtrace" >/dev/null; then
+ set -o errtrace
+ trap 'rc=$?; set +x; set -o | grep "errexit.*on" >/dev/null && exit $rc' ERR
+ fi
# If `before` wasn't redefined, then this is `:`.
before