summaryrefslogtreecommitdiff
path: root/include/inject.sh
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-10-04 06:13:15 +0100
committerLeah Rowe <leah@libreboot.org>2025-10-04 07:17:42 +0100
commit4f01dc704a1ed0e18fc0efc1500e61b4bc41b0e6 (patch)
tree5f6045ed1662614ad75c9eb46be3867937640450 /include/inject.sh
parent7f8d85140fd229e97e539ca463fbd94545997fd6 (diff)
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>
Diffstat (limited to 'include/inject.sh')
-rw-r--r--include/inject.sh17
1 files changed, 14 insertions, 3 deletions
diff --git a/include/inject.sh b/include/inject.sh
index 9f30b0a0..19a2716e 100644
--- a/include/inject.sh
+++ b/include/inject.sh
@@ -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"