summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-10-04 16:43:37 +0100
committerLeah Rowe <leah@libreboot.org>2025-10-04 16:57:36 +0100
commit31fa7ea5915e23d405034537e860fec7d2058ab6 (patch)
tree7998cc71164e76e31e36c6f939596b8f6c066552
parent2956fcc0516d2db11294a05e9f21b1d8b73c8e63 (diff)
vendor.sh: re-do the previously reverted change
but do it better. this time, the change won't cause any behavioural differences. the reason for the change is we don't want "$@" inside an eval statement, if such calamity can be avoided. Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--include/vendor.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/vendor.sh b/include/vendor.sh
index 2a3ea26a..a6b9fd27 100644
--- a/include/vendor.sh
+++ b/include/vendor.sh
@@ -490,9 +490,18 @@ extract_fsp()
setvfile()
{
- [ -n "$vcfg" ] && for c in $checkvarschk; do
+ [ -n "$vcfg" ] && for c in $checkvarschk
+ do
+ do_getvfile="n"
vcmd="[ \"\${$c}\" != \"/dev/null\" ] && [ -n \"\${$c}\" ]"
- eval "$vcmd && getvfile \"\$@\" && return 0"
+
+ eval "$vcmd && do_getvfile=\"y\""
+
+ if [ "$do_getvfile" = "y" ]; then
+ if getvfile "$@"; then
+ return 0
+ fi
+ fi
done && return 1; :
}