fix lbmk shellcheck errors

There was also a condition in run_make_command that is now
an OR, where it was an AND, on script/trees, to fix the use
of mixed (and erroneous) OR/AND operators.

I'm planning a much more invasive audit than this. These are
light fixes, intended for Libreboot 20241206 rev8.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2025-01-02 23:52:45 +00:00
parent 8276560cc9
commit 0cf58c2273
7 changed files with 62 additions and 54 deletions
+10 -6
View File
@@ -43,8 +43,9 @@ 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 chkvars grub_modules grub_install_modules
$dry x_ rm -f "$srcdir/grub.elf"; $dry \
"$srcdir/grub-mkstandalone" --grub-mkimage="$srcdir/grub-mkimage" \
-O i386-coreboot -o "$srcdir/grub.elf" -d "${srcdir}/grub-core/" \
@@ -62,7 +63,7 @@ mkvendorfiles()
printf "%s\n" "${version%%-*}" > "$srcdir/.coreboot-version" || \
$err "!mk $srcdir .coreboot-version"
[ -z "$mode" ] && [ "$target" != "$tree" ] && \
x_ ./mk download $target; return 0
x_ ./mk download "$target"; return 0
}
cook_coreboot_config()
@@ -113,7 +114,8 @@ mkcorebootbin()
if [ "$payload_uboot_i386" = "y" ] || \
[ "$payload_uboot_amd64" = "y" ]; then
printf "'$target' has x86 U-Boot; assuming SeaBIOS=y\n" 1>&2
printf "'%s' has x86 U-Boot; assuming SeaBIOS=y\n" \
"$target" 1>&2
payload_seabios="y"
fi
@@ -204,10 +206,12 @@ mkseagrub()
add_uboot()
{
if [ "$displaymode" = "txtmode" ]; then
printf "cb/$target: Cannot use U-Boot in text mode\n" 1>&2
printf "cb/%s: Cannot use U-Boot in text mode\n" \
"$target" 1>&2
return 0
elif [ "$initmode" = "normal" ]; then
printf "cb/$target: Cannot use U-Boot in normal initmode\n" 1>&2
printf "cb/%s: Cannot use U-Boot in normal initmode\n" \
"$target" 1>&2
return 0
fi