hiby: r1_patcher: stop script execution on any error
rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]>
| Newsgroups | gmane.comp.systems.archos.rockbox.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit 3bfce366acea3fdc2620ac7552656808b48c97a4 Author: Roman Artiukhin <[email protected]> Date: Thu Jan 29 12:13:26 2026 +0200 hiby: r1_patcher: stop script execution on any error Change-Id: Ic683b8ed155a5e9d2779d40a3b7673579056d9b1 diff --git a/tools/r1_patcher/r1_patcher.sh b/tools/r1_patcher/r1_patcher.sh index 7d1653310e..7cc102044b 100755 --- a/tools/r1_patcher/r1_patcher.sh +++ b/tools/r1_patcher/r1_patcher.sh @@ -8,6 +8,12 @@ if [[ $# -ne 2 ]]; then exit 1 fi +# Fail fast on any error, undefined variable, or failed pipeline +set -euo pipefail + +# Report errors with line number and the failing command +trap 'echo "ERROR at line ${LINENO}: ${BASH_COMMAND}" >&2' ERR + ################################################################################ ### init ################################################################################ -- rockbox-cvs mailing list [email protected] https://lists.haxx.se/mailman/listinfo/rockbox-cvs