mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-19 00:03:45 +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) 2020-2021,2023-2025 Leah Rowe <leah@libreboot.org>
|
||||||
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
|
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
|
||||||
|
|
||||||
eval "`setvars "" loc url bkup_url subcurl subhash subgit subgit_bkup \
|
depend=""
|
||||||
depend subcurl_bkup`"
|
loc=""
|
||||||
|
url=""
|
||||||
|
bkup_url=""
|
||||||
|
subgit=""
|
||||||
|
subgit_bkup=""
|
||||||
|
subcurl=""
|
||||||
|
subcurl_bkup=""
|
||||||
|
subhash=""
|
||||||
|
|
||||||
tmpgit="$xbtmp/gitclone"
|
tmpgit="$xbtmp/gitclone"
|
||||||
tmpgitcache="$xbtmp/tmpgit"
|
tmpgitcache="$xbtmp/tmpgit"
|
||||||
@@ -76,8 +83,12 @@ fetch_submodule()
|
|||||||
{
|
{
|
||||||
mcfgdir="$mdir/${1##*/}"
|
mcfgdir="$mdir/${1##*/}"
|
||||||
|
|
||||||
eval \
|
subhash=""
|
||||||
"`setvars "" subhash subgit subgit_bkup subcurl subcurl_bkup st`"
|
subgit=""
|
||||||
|
subgit_bkup=""
|
||||||
|
subcurl=""
|
||||||
|
subcurl_bkup=""
|
||||||
|
st=""
|
||||||
|
|
||||||
eval "`setcfg "$mcfgdir/module.cfg" 0`"
|
eval "`setcfg "$mcfgdir/module.cfg" 0`"
|
||||||
|
|
||||||
|
|||||||
+5
-1
@@ -2,7 +2,11 @@
|
|||||||
|
|
||||||
# Copyright (c) 2023-2025 Leah Rowe <leah@libreboot.org>
|
# Copyright (c) 2023-2025 Leah Rowe <leah@libreboot.org>
|
||||||
|
|
||||||
eval "`setvars "" reldir reldest vdir rsrc relmode`"
|
reldir=""
|
||||||
|
reldest=""
|
||||||
|
vdir=""
|
||||||
|
rsrc=""
|
||||||
|
relmode=""
|
||||||
|
|
||||||
release()
|
release()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user