inject/vendor.sh: stricter set + usage

set - as soon as possible, for example in the extract_me
function.

we only turn off error handling when certain error-prone
tasks are performed, and mitigations are in place after
these commands run to make sure that the result was valid.

this is because in some cases, we want certain buggy behaviours
to be permitted, with errors handled in a more fine-tuned way,
because sh can sometimes be much stricter depending on the
implementation; otherwise, we almost always rely on -e -u in
most of the build system.

this mainly affects the vendorfile insertion logic.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2025-09-01 07:08:47 +01:00
parent 24a8226fee
commit 40f064ae33
2 changed files with 1 additions and 1 deletions
-1
View File
@@ -19,7 +19,6 @@ inject()
{ {
remkdir "$tmpromdel" remkdir "$tmpromdel"
set +u +e
[ $# -lt 1 ] && err "No options specified" [ $# -lt 1 ] && err "No options specified"
eval "`setvars "" nuke new_mac xchanged`" eval "`setvars "" nuke new_mac xchanged`"
+1
View File
@@ -160,6 +160,7 @@ extract_intel_me()
x_ rm -Rf "$xbmkpwd/metmp" x_ rm -Rf "$xbmkpwd/metmp"
( fx_ find_me x_ find "$xbmkpwd/$appdir" -type f ) || :; : ( fx_ find_me x_ find "$xbmkpwd/$appdir" -type f ) || :; :
set -u -e
if [ "$ME11bootguard" = "y" ]; then if [ "$ME11bootguard" = "y" ]; then
apply_deguard_hack apply_deguard_hack