xbmk: remove even more eval statements

in one or two cases, the use of eval is retained, but
modified so as to be safer.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2025-10-04 06:13:15 +01:00
parent 7f8d85140f
commit 4f01dc704a
7 changed files with 249 additions and 59 deletions
+10 -2
View File
@@ -18,7 +18,10 @@ extract_refcode()
# and refcode is extracted from an image using the old scheme. we use
# cbfstool from coreboot 4.11_branch, the tree used by ASUS KGPE-D16:
chkvars cbfstoolref
if [ -z "$cbfstoolref" ]; then
err "cbfstoolref not set" "extract_refcode" "$@"
fi
x_ mkdir -p "${_pre_dest%/*}"
x_ "$cbfstoolref" "$appdir/bios.bin" extract \
@@ -35,7 +38,12 @@ extract_refcode()
extract_mrc()
{
chkvars "MRC_board" "CONFIG_MRC_FILE"
if [ -z "$MRC_board" ]; then
err "MRC_board unset" "extract_mrc" "$@"
elif [ -z "$CONFIG_MRC_FILE" ]; then
err "CONFIG_MRC_FILE unset" "extract_mrc" "$@"
fi
SHELLBALL="chromeos-firmwareupdate-$MRC_board"
(