summaryrefslogtreecommitdiff
path: root/script/build
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-10-07 05:36:52 +0100
committerLeah Rowe <leah@libreboot.org>2023-10-07 05:37:11 +0100
commit4708da2ca9a72520f39749b3b34b0bdc2fbfa15d (patch)
tree8c7f436fc53d10665f150e295d2d488b3f86e729 /script/build
parent0fad3497b82d9225468835d1b27717050ca6de46 (diff)
use quotes when checking empty strings in scripts
this is far less error-prone Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script/build')
-rwxr-xr-xscript/build/fw/coreboot14
1 files changed, 7 insertions, 7 deletions
diff --git a/script/build/fw/coreboot b/script/build/fw/coreboot
index d0357c59..dede12c8 100755
--- a/script/build/fw/coreboot
+++ b/script/build/fw/coreboot
@@ -72,15 +72,15 @@ check_target()
# Override the above defaults using target.cfg
. "${targetdir}/target.cfg"
- [ -z ${grub_scan_disk} ] && \
+ [ -z "${grub_scan_disk}" ] && \
grub_scan_disk="both"
[ "${grub_scan_disk}" != "both" ] && [ "${grub_scan_disk}" != "ata" ] \
&& [ "${grub_scan_disk}" != "ahci" ] && \
grub_scan_disk="both"
- [ -z ${tree} ] && \
+ [ -z "${tree}" ] && \
err "Target '${board}' defines no tree. Skipping build."
- [ -z ${arch} ] && \
+ [ -z "${arch}" ] && \
err "Target '${board}' defines no arch. Skipping build."
[ "${payload_memtest}" != "y" ] && \
@@ -104,13 +104,13 @@ check_target()
[ "${payload_uboot}" != "n" ] && [ "${payload_uboot}" != "y" ] && \
payload_uboot="n"
- [ "${payload_uboot}" = "y" ] && [ -z ${uboot_config} ] && \
+ [ "${payload_uboot}" = "y" ] && [ -z "${uboot_config}" ] && \
uboot_config="default"
[ "${vendorfiles}" != "n" ] && [ "${vendorfiles}" != "y" ] && \
vendorfiles="y"
# Override all payload directives with cmdline args
- [ -z ${_payload} ] && return 0
+ [ -z "${_payload}" ] && return 0
printf "setting payload to: %s\n" "${_payload}"
eval "$(setvars "n" payload_grub payload_memtest payload_seabios \
payload_seabios_withgrub payload_uboot payload_grub_withseabios)"
@@ -192,7 +192,7 @@ build_target()
hmode="vesafb"
[ "${initmode}" = "vgarom" ] || hmode="corebootfb"
modes="${hmode} txtmode"
- [ -z ${_displaymode} ] || modes="${_displaymode}"
+ [ -z "${_displaymode}" ] || modes="${_displaymode}"
for y in ${modes}; do
displaymode="${y}"
[ "${initmode}" = "normal" ] && \
@@ -289,7 +289,7 @@ build_grub_roms()
for kmapfile in "${kmapdir}"/*; do
keymaps="${keymaps} ${kmapfile}"
done
- [ -z ${_keyboard} ] || keymaps="${kmapdir}/${_keyboard}.gkb"
+ [ -z "${_keyboard}" ] || keymaps="${kmapdir}/${_keyboard}.gkb"
for keymapfile in ${keymaps}; do
[ -f "${keymapfile}" ] || continue