From bcda53b383d4890d0b5dc4180a9f96227970d8fc Mon Sep 17 00:00:00 2001 From: ngn Date: Sun, 18 Aug 2024 22:17:43 +0300 Subject: [PATCH] update: add GRUB warning for matter-iso --- README.md | 2 +- matter-iso/main.sh | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c101609..5e0ebf9 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Following dependencies are required for these scripts and tools: - coreutils - gcc - make -- GRUB +- GRUB (please see matter-iso warning) - gnupg - fakeroot - (GNU) tar diff --git a/matter-iso/main.sh b/matter-iso/main.sh index 281089b..73894db 100755 --- a/matter-iso/main.sh +++ b/matter-iso/main.sh @@ -75,6 +75,14 @@ check_iso_vars() { ################# ## main script ## ################# +if ! type "grub-mkrescue" > /dev/null; then + error "You need to install GRUB to create ISO files with grub-mkrescue" + set_indent + info "If you want to create UEFI ISO files make sure you install x64 GRUB or grub-efi" + info "If you want to create BIOS ISO files make sure you install x86 GRUB or grub-bios" + exit 1 +fi + if [ "$EUID" -ne 0 ]; then error "You should run this script as root" exit 1