xbmk: remove more eval statements

i will eventually find a way to remove them all,
while still leaving the code completely clean.

in practise, i never use the contents of a file
for eval and the inputs are carefully checked.

however, over-use of eval is always a bad idea
in shell scripting.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2025-10-04 02:55:52 +01:00
parent 0605fbe720
commit a09ec1d02b
2 changed files with 20 additions and 5 deletions
+15 -4
View File
@@ -3,8 +3,15 @@
# Copyright (c) 2020-2021,2023-2025 Leah Rowe <leah@libreboot.org>
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
eval "`setvars "" loc url bkup_url subcurl subhash subgit subgit_bkup \
depend subcurl_bkup`"
depend=""
loc=""
url=""
bkup_url=""
subgit=""
subgit_bkup=""
subcurl=""
subcurl_bkup=""
subhash=""
tmpgit="$xbtmp/gitclone"
tmpgitcache="$xbtmp/tmpgit"
@@ -76,8 +83,12 @@ fetch_submodule()
{
mcfgdir="$mdir/${1##*/}"
eval \
"`setvars "" subhash subgit subgit_bkup subcurl subcurl_bkup st`"
subhash=""
subgit=""
subgit_bkup=""
subcurl=""
subcurl_bkup=""
st=""
eval "`setcfg "$mcfgdir/module.cfg" 0`"
+5 -1
View File
@@ -2,7 +2,11 @@
# Copyright (c) 2023-2025 Leah Rowe <leah@libreboot.org>
eval "`setvars "" reldir reldest vdir rsrc relmode`"
reldir=""
reldest=""
vdir=""
rsrc=""
relmode=""
release()
{