From 4f01dc704a1ed0e18fc0efc1500e61b4bc41b0e6 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sat, 4 Oct 2025 06:13:15 +0100 Subject: 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 --- include/inject.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'include/inject.sh') 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" -- cgit v1.2.1