summaryrefslogtreecommitdiff
path: root/buildlive
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2016-09-06 14:41:29 +0800
committerIru Cai <mytbk920423@gmail.com>2016-09-06 14:41:29 +0800
commit505b5566930cd679242bf888590ec0bda2fb326d (patch)
tree6be93718f73bf16a578b5c488ddde9615fdf7e68 /buildlive
parent46beeb65d563d6b12383429368fa1408d468217d (diff)
downloadliveusb-builder-505b5566930cd679242bf888590ec0bda2fb326d.tar.xz
buildlive: prompt before installing GRUB
Diffstat (limited to 'buildlive')
-rwxr-xr-xbuildlive7
1 files changed, 5 insertions, 2 deletions
diff --git a/buildlive b/buildlive
index 4d5d52c..1831577 100755
--- a/buildlive
+++ b/buildlive
@@ -111,6 +111,9 @@ do
done
if [ "$INSTALL_GRUB" == 1 ]; then
- as-root grub-install --boot-directory="$ROOTPATH" --target=i386-pc "$DEVNAME"
- as-root grub-install --boot-directory="$ROOTPATH" --efi-directory="$ROOTPATH" --bootloader-id=grub --target=x86_64-efi --removable --no-nvram "$DEVNAME"
+ read -p 'Answer Y to install GRUB.[Y/n] '
+ if [[ "$REPLY" =~ ^[Yy]|^$ ]]; then
+ as-root grub-install --boot-directory="$ROOTPATH" --target=i386-pc "$DEVNAME"
+ as-root grub-install --boot-directory="$ROOTPATH" --efi-directory="$ROOTPATH" --bootloader-id=grub --target=x86_64-efi --removable --no-nvram "$DEVNAME"
+ fi
fi