common.sh: set -E flag in switch_to_strict_mode switch_to_strict_mode enables the -e flag to cause the program exits immediately without additional information once an error occurs. The trap 'die_err_trap' ERR is added to provide backtrace and debug information when error happens. However, the ERR trap is not inherited and local to the current scope by default, which makes this line totally useless. Set -E flag in switch_to_strict_mode function to let the ERR trap inherited by the functions and make it work as expected. Also, ignore the error in die_err_trap if errexit option is not set, to prevent from unexpected dying when errors happening in 'set +e' / 'set -e' surrounded snippets. BUG=b:388682790 TEST=./update_kernel.sh $DUT TEST=CQ Change-Id: I31d1cd760758f1ff28942567b5b6d43a4f7525d4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosutils/+/6270276 Tested-by: Yu-Che Cheng <[email protected]> Commit-Queue: Yu-Che Cheng <[email protected]> Reviewed-by: Raul Rangel <[email protected]> Reviewed-by: Fei Shao <[email protected]>
src/scripts directoryThis repository contains build tools and scripts written in shell (e.g., Bash). Historically, much of our build process was written in shell in this directory, however, we're currently in the process of migrating many scripts to Python in Chromite.
In general, we're not currently accepting new scripts in this directory.
If you want to host a script for yourself/local team, feel free to use the src/platform/dev/contrib/ directory instead.