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
+14 -3
View File
@@ -17,8 +17,17 @@ if [ -n "$cvchk" ]; then
cv="$cv $cvchk"
fi
eval "`setvars "" archive boarddir IFD_platform ifdprefix tree new_mac \
tmpromdir board xchanged $cv`"
archive=""
boarddir=""
IFD_platform=""
ifdprefix=""
tree=""
new_mac=""
tmpromdir=""
board=""
xchanged=""
eval "`setvars "" $cv`"
inject()
{
@@ -118,7 +127,9 @@ check_target()
. "$boarddir/target.cfg" || \
err "Can't read '$boarddir/target.cfg'" "check_target" "$@"
chkvars tree
if [ -z "$tree" ]; then
err "tree unset in '$boarddir/target.cfg'" "check_target" "$@"
fi
x_ ./mk -d coreboot "$tree"