mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 14:02:52 +02:00
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:
+15
-4
@@ -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
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user