aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobby <[email protected]>2026-02-24 09:28:27 +0530
committerBobby <[email protected]>2026-02-24 09:28:27 +0530
commit87923d9f8ca51327e5ac5589f10548c9e6e5992b (patch)
tree94ee97c119675a48fa59f891b921e59170fbc6b8
parentd55e3ad67f624a4064c1f864e69809d28770c858 (diff)
downloadakiba-87923d9f8ca51327e5ac5589f10548c9e6e5992b.tar.xz
akiba-87923d9f8ca51327e5ac5589f10548c9e6e5992b.zip
fix: Simplify UEFI firmware detection logic in run script
-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