diff options
author | Leah Rowe <leah@libreboot.org> | 2025-10-04 05:23:47 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-10-04 05:23:47 +0100 |
commit | 7f8d85140fd229e97e539ca463fbd94545997fd6 (patch) | |
tree | 88528dba20c0c08fcb2aa0e84fc4d9be28d6febf /include/get.sh | |
parent | 0a74cc8ec6038492f64074e18cc10ba7ab31ac94 (diff) |
xbmk: remove the setcfg function
this allows me to remove several eval calls, and the
errors relating to configs can now show exactly which
function they occured in, allowing for easier debugging.
once again, eval should be used sparingly if at all.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/get.sh')
-rw-r--r-- | include/get.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/get.sh b/include/get.sh index db61958b..5cc65c2b 100644 --- a/include/get.sh +++ b/include/get.sh @@ -29,7 +29,9 @@ fetch_project() { xtree="" - eval "`setcfg "config/git/$project/pkg.cfg"`" + . "config/git/$project/pkg.cfg" || \ + err "Can't read config 'config/git/$project/pkg.cfg'" \ + "fetch_project" "@" chkvars url bkup_url @@ -90,7 +92,11 @@ fetch_submodule() subcurl_bkup="" st="" - eval "`setcfg "$mcfgdir/module.cfg" 0`" + if e "$mcfgdir/module.cfg" f missing; then + return 0 + fi + . "$mcfgdir/module.cfg" || \ + err "Can't read '$mcfgdir/module.cfg'" "fetch_submodules" "$@" if [ -n "$subgit" ] || [ -n "$subgit_bkup" ]; then st="$st git" |