Meta: Check if SERENITY_USE_SDCARD is set before checking its value

This avoids a bash complaint for the new option
This commit is contained in:
Andrew Kaster 2023-04-02 13:07:31 -06:00
commit 875c3d109f
Notes: sideshowbarker 2024-07-18 02:13:10 +09:00

View file

@ -254,7 +254,7 @@ else
fi
fi
if [ "$SERENITY_USE_SDCARD" -eq 1 ]; then
if [ -n "${SERENITY_USE_SDCARD}" ] && [ "${SERENITY_USE_SDCARD}" -eq 1 ]; then
SERENITY_BOOT_DRIVE="-device sdhci-pci -device sd-card,drive=sd-boot-drive -drive id=sd-boot-drive,if=none,format=raw,file=${SERENITY_DISK_IMAGE}"
SERENITY_KERNEL_CMDLINE="$SERENITY_KERNEL_CMDLINE root=sd2:0:0"
fi