error handling code cleanup and fixes

in some cases, use of x_ or xx_ can be error-prone,
due to the way $@ is handled; commands requiring
quotes, or with funny file names as arguments such
as spaces in the file name, or other special
characters, can make the x/xx functions break.

in those cases, where x/xx must not be used, the
commands use || err instead

in other cases, use of x/xx is superfluous, and has
been removed in some commands.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2023-10-20 04:10:50 +01:00
parent 4e54a051ef
commit 6af65ad430
5 changed files with 48 additions and 47 deletions
+1 -2
View File
@@ -67,8 +67,7 @@ handle_coreboot_utils()
x_ mkdir -p "cbutils/${1}" && \
x_ cp "src/coreboot/${1}/util/${util}/${util}" \
"cbutils/${1}"
[ -z "${mode}" ] || \
x_ rm -Rf "cbutils/${1}"
[ -z "${mode}" ] || x_ rm -Rf "cbutils/${1}"
done
}