From 5dc6f7667d7b1a91ea6e5320794a7bfddf0328dd Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Mon, 3 Jan 2022 20:44:30 -0300 Subject: [PATCH] Fix more bugs in mountPart() --- install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 683583d..6bc0c93 100755 --- a/install.sh +++ b/install.sh @@ -165,9 +165,13 @@ mountPart() { local IFS=' ' result=$(whiptail --inputbox "Enter the absolute path." 0 0 3>&1 1>&2 2>&3) exitIfCancel "You must enter a path." "partDisks" - mkdir -p "/mnt/$result" + bootPath=$(echo $result | sed 's/^\///g') + mkdir -p "/mnt/$bootPath" while [[ ! -d "$result" ]]; do result=$(whiptail --inputbox "Path isn't valid. Please try again" 0 0 3>&1 1>&2 2>&3) + exitIfCancel "You must enter a path." "partDisks" + bootPath=$(echo $result | sed 's/^\///g') + mkdir -p "/mnt/$bootPath" done fi mount "$bootPart" "/mnt/$result" 2>&1 | debug