diff options
Diffstat (limited to 'unmaintained/roundup/roundup-fix-busybox-shell-opts.patch')
-rw-r--r-- | unmaintained/roundup/roundup-fix-busybox-shell-opts.patch | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/unmaintained/roundup/roundup-fix-busybox-shell-opts.patch b/unmaintained/roundup/roundup-fix-busybox-shell-opts.patch new file mode 100644 index 0000000000..b6185e96ab --- /dev/null +++ b/unmaintained/roundup/roundup-fix-busybox-shell-opts.patch @@ -0,0 +1,19 @@ +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 |