xbmk: don't use backticks for command substitution

the newer way handles escaped characters better, and it
can be nested more easily. it's also more readable.

personally, i prefer the old way, because it's more
minimalist, but it occurs to me that a lot of people
nowadays don't know about backticks, but they do know
of the modern way.

to make the code more readable, i have modernised it.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2025-09-11 10:17:50 +01:00
parent 5cfe54b06d
commit 4999a49de3
10 changed files with 58 additions and 56 deletions
+7 -6
View File
@@ -12,15 +12,15 @@ cv="CONFIG_GBE_BIN_PATH"
[ -n "$cvxbmk" ] && cv="$cv $cvxbmk"
[ -n "$cvchk" ] && cv="$cv $cvchk"
eval "`setvars "" archive boarddir IFD_platform ifdprefix tree new_mac \
tmpromdir board xchanged $cv`"
eval "$(setvars "" archive boarddir IFD_platform ifdprefix tree new_mac \
tmpromdir board xchanged $cv)"
inject()
{
remkdir "$tmpromdel"
[ $# -lt 1 ] && err "No options specified"
eval "`setvars "" nuke new_mac xchanged`"
eval "$(setvars "" nuke new_mac xchanged)"
archive="$1";
new_mac="xx:xx:xx:xx:xx:xx"
@@ -53,7 +53,8 @@ check_release()
[ -L "$archive" ] && err "'$archive' is a symlink"
e "$archive" f missing && err "'$archive' missing"
archivename="`basename "$archive"`" || err "Can't get '$archive' name"
archivename="$(basename "$archive" || err "Can't get '$archive' name")" \
|| err
[ -z "$archivename" ] && err "Can't determine archive name"
case "$archivename" in
@@ -73,7 +74,7 @@ check_target()
[ "$board" = "${board#serprog_}" ] || return 1
boarddir="$cbcfgsdir/$board"
eval "`setcfg "$boarddir/target.cfg"`"
eval "$(setcfg "$boarddir/target.cfg")"
chkvars tree && x_ ./mk -d coreboot "$tree"
ifdtool="elf/coreboot/$tree/ifdtool"
@@ -104,7 +105,7 @@ readkconfig()
{
x_ rm -f "$xbtmp/cbcfg"
fx_ scankconfig x_ find "$boarddir/config" -type f
eval "`setcfg "$xbtmp/cbcfg" 1`"
eval "$(setcfg "$xbtmp/cbcfg" 1)"
setvfile "$@" || return 1; :
}