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/tree.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/tree.sh')
-rw-r--r-- | include/tree.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/tree.sh b/include/tree.sh index 98442e5c..80815465 100644 --- a/include/tree.sh +++ b/include/tree.sh @@ -222,7 +222,9 @@ configure_project() # globally initialise all variables for a source tree / target: if e "$datadir/mkhelper.cfg" f; then - eval "`setcfg "$datadir/mkhelper.cfg"`" + . "$datadir/mkhelper.cfg" || \ + err "Can't read '$datadir/mkhelper.cfg'" \ + "configure_project" "$@" fi # override target/tree specific variables from per-target config: @@ -241,7 +243,8 @@ configure_project() rev="" tree="" - eval "`setcfg "$_tcfg"`" + . "$_tcfg" || \ + err "Can't read '$_tcfg'" "configure_project" "$@" if [ "$_f" = "-d" ]; then build_depend="" # dry run |