From a930708afed38c6ba199c0205f5cfe9eeba87e2d Mon Sep 17 00:00:00 2001 From: SkeletonMan03 Date: Tue, 6 Feb 2024 19:30:40 -0600 Subject: [PATCH] Ask if want to use GPT --- Medicat_Installer.sh | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/Medicat_Installer.sh b/Medicat_Installer.sh index 6fbbf90..9f84884 100755 --- a/Medicat_Installer.sh +++ b/Medicat_Installer.sh @@ -58,6 +58,7 @@ colEcho $cyanB "Enhancements by Manganar.\n" colEcho $cyanB "Thanks to @m3p89goljrf7fu9eched in the Medicat Discord for pointing out a bug.\n" # Set variables to support different distros. +# This needs to be fixed later, there is a better way, but I don't currently have the time - LordSkeletonMan if grep -qs "ubuntu" /etc/os-release; then os="ubuntu" pkgmgr="apt" @@ -240,11 +241,25 @@ while [[ "$checkingconfirm" != [NnYy]* ]]; do done colEcho $cyanB "Installing Ventoy on$whiteB $drive" -sudo sh ./ventoy/Ventoy2Disk.sh -I $drive -if [ "$?" != "0" ]; then - colEcho $redB "ERROR: Unable to install Ventoy. Exiting..." - exit 1 -fi + +while [[ "$usegpt" != [NnYy]* ]]; do + read -e -p "Would you like to use GPT? (defaults to MBR) (Y/N)" usegpt + if [[ "$usegpt" == [Nn]* ]]; then + colEcho $yellowB "Using MBR" + sudo sh ./ventoy/Ventoy2Disk.sh -I $drive + if [ "$?" != "0" ]; then + colEcho $redB "ERROR: Unable to install Ventoy. Exiting..." + exit 1 + fi + elif [[ "$usegpt" == [Yy]* ]]; then + colEcho $yellowB "Using GPT" + sudo sh ./ventoy/Ventoy2Disk.sh -I -g $drive + if [ "$?" != "0" ]; then + colEcho $redB "ERROR: Unable to install Ventoy. Exiting..." + exit 1 + fi + fi +done colEcho $cyanB "Unmounting drive$whiteB $drive" sudo umount $drive