aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/run.sh28
1 files changed, 16 insertions, 12 deletions
diff --git a/scripts/run.sh b/scripts/run.sh
index 94b0098..f6c5d5a 100755
--- a/scripts/run.sh
+++ b/scripts/run.sh
@@ -1,18 +1,22 @@
#!/bin/bash
-for fw in \
- /opt/homebrew/share/qemu/edk2-x86_64-code.fd \
- /usr/share/edk2/x64/OVMF_CODE.fd \
- /usr/share/edk2/x64/OVMF_CODE.4m.fd
-do
- if [ -f "$fw" ]; then
- UEFI_FW="$fw"
- break
- fi
-done
+UEFI_FW="/opt/homebrew/share/qemu/edk2-x86_64-code.fd"
+if [ ! -f "$UEFI_FW" ]; then
+ UEFI_FW="/usr/share/edk2/x64/OVMF_CODE.4m.fd"
+fi
+if [ ! -f "$UEFI_FW" ]; then
+ UEFI_FW="/usr/share/edk2/x64/OVMF_CODE.fd"
+fi
+if [ ! -f "$UEFI_FW" ]; then
+ UEFI_FW="/usr/share/OVMF/OVMF_CODE.fd"
+fi
+if [ ! -f "$UEFI_FW" ]; then
+ UEFI_FW="/usr/share/qemu/OVMF.fd"
+fi
-if [ -z "$UEFI_FW" ]; then
- echo "UEFI firmware not found."
+if [ ! -f "$UEFI_FW" ]; then
+ echo "Error: UEFI firmware not found"
+ echo "Please install OVMF/EDK2"
exit 1
fi