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
+3 -3
View File
@@ -32,8 +32,8 @@ copyps1bios()
mkpayload_grub()
{
eval "`setvars "" grub_modules grub_install_modules`"
$dry eval "`setcfg "$grubdata/module/$tree"`"
eval "$(setvars "" grub_modules grub_install_modules)"
$dry eval "$(setcfg "$grubdata/module/$tree")"
$dry x_ rm -f "$srcdir/grub.elf"; $dry \
x_ "$srcdir/grub-mkstandalone" --grub-mkimage="$srcdir/grub-mkimage" \
-O i386-coreboot -o "$srcdir/grub.elf" -d "${srcdir}/grub-core/" \
@@ -256,7 +256,7 @@ cprom()
newrom="${newrom%.rom}_${tmpnew%.gkb}.rom"
irom="$tmprom"
[ $# -lt 1 ] || irom="`mktemp || err "!mk irom, $(echo "$@")"`" || err
[ $# -lt 1 ] || irom="$(mktemp || err "!mk irom, $(echo "$@")")" || err
[ $# -gt 0 ] && x_ cp "$tmprom" "$irom" && cpcmd="mv"
[ $# -gt 0 ] && [ "${1%.gkb}" != "$1" ] && \