From c6ffd94ee73310e512ca443d70c6cef8cc591eea Mon Sep 17 00:00:00 2001 From: Salt Date: Fri, 4 Dec 2020 06:39:11 -0600 Subject: [PATCH] Skip GRUB config if user supplies empty response --- gentoostrap.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gentoostrap.sh b/gentoostrap.sh index 70d84b4..3ae4870 100755 --- a/gentoostrap.sh +++ b/gentoostrap.sh @@ -320,6 +320,10 @@ build-gentoo-chroot() { build-bootloader() { # Last few chroot steps, mostly involving GRUB read -p "Enter device to install GRUB to: " grubdev + if [ -z "$grubdev" ]; then + log "Skipping" + return 0 + fi log "Configuring GRUB" [ -f /boot/grub ] && rm /boot/grub -f [ -d /boot/grub ] || mkdir /boot/grub -p