From 4eba32a5b89982c8aa289e8fd7e2123f070509cc Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Sat, 25 Dec 2021 19:30:47 -0300 Subject: [PATCH] Use local IFS --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 4aa848b..bec0f6d 100755 --- a/install.sh +++ b/install.sh @@ -24,10 +24,9 @@ updateSystemClock() { } showDisks() { - IFS_ORIG=$IFS - IFS=$'\n' + local IFS=$'\n' + setDelimiters "" formatOptions $(lsblk -d -p -n -l -o NAME,SIZE -e 7,11) - IFS=$IFS_ORIG result=$(whiptail --title "Select a disk" --menu "" 0 0 0 "${options[@]}" 3>&1 1>&2 2>&3) disk=${result%%\ *} @@ -83,6 +82,7 @@ generateFstab() { setTimeZone() { whiptail --msgbox "Now we will set the timezone." 0 0 + setDelimiters "" formatOptions $(ls -l /usr/share/zoneinfo/ | grep '^d' | awk '{printf $9" \n"}' | awk '!/posix/ && !/right/') region=$(whiptail --title "Region" --menu "" 0 0 0 "${options[@]}" 3>&1 1>&2 2>&3) formatOptions $(ls -l /usr/share/zoneinfo/${region} | grep -v '^d' | awk '{printf $9" \n"}') @@ -135,7 +135,7 @@ grubSetUp() { } askForPassword() { - password=$(whiptail --inputbox "Enter the ${1} password." 0 0 3>&1 1>&2 2>&3) + password=$(whiptail --inputbox "Enter the password for ${1}." 0 0 3>&1 1>&2 2>&3) passwordRep=$(whiptail --inputbox "Reenter password." 0 0 3>&1 1>&2 2>&3) while ! [ "$password" = "$passwordRep" ]; do password=$(whiptail --inputbox "Passwords do not match! Please enter the password again." 0 0 3>&1 1>&2 2>&3)