aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2019-11-18 22:40:21 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2019-11-18 22:40:21 +0100
commit2d63f32c6907c559e0fd4c911703c653f6a9a47b (patch)
treed9d2da112ee8edcecd8202f44c032085f094f000
parentmkdir mkdir (diff)
downloadarch-installer-2d63f32c6907c559e0fd4c911703c653f6a9a47b.tar.gz
arch-installer-2d63f32c6907c559e0fd4c911703c653f6a9a47b.tar.bz2
arch-installer-2d63f32c6907c559e0fd4c911703c653f6a9a47b.tar.xz
arch-installer-2d63f32c6907c559e0fd4c911703c653f6a9a47b.tar.zst
arch-installer-2d63f32c6907c559e0fd4c911703c653f6a9a47b.zip
Confirm, awk in colors
-rwxr-xr-xjoes-arch-install-UEFI.sh19
1 files changed, 16 insertions, 3 deletions
diff --git a/joes-arch-install-UEFI.sh b/joes-arch-install-UEFI.sh
index f7998bc..dea06c7 100755
--- a/joes-arch-install-UEFI.sh
+++ b/joes-arch-install-UEFI.sh
@@ -136,15 +136,15 @@ while [[ $answr != y && $answr != Y && $answr != yes && $answr != Yes && $answr
echo && echo
dn=$(lsblk | grep -c disk)
id=1
- lsblk | grep disk | awk '{print "${BBLUE}DISK", "", "", "SIZE${END}";}{print "----", "", "", "----"}{print "${BCYAN}$1" " ->", "${BYELLOW}$4"}'
+ lsblk | grep disk | awk '{print "\033[1;34mDISK", "", "", "SIZE""\033[0m";}{print "----", "", "", "----";}{print "\033[1;36m"$1 "\033[1;34m ->", "\033[1;36m"$4;}'
echo && echo
- echo "${BMAGENTA}Please choose the drive on which Arch Linux shoud be installed:${END}"
+ echo -e "${BMAGENTA}Please choose the drive on which Arch Linux shoud be installed:${END}"
while [[ $dn != 0 ]]; do
echo "$id. $(lsblk | grep disk | awk '{print $1}' | sed -n "$id"p)"
((dn--))
((id++))
done
- echo -n "> "
+ echo -n -e "${BYELLOW}> "
read -r drvnm
if [[ $drvnm == "" ]]; then
echo && echo
@@ -234,6 +234,19 @@ __G"
fi
done
+answr="n"
+while [[ $answr != y && $answr != Y && $answr != yes && $answr != Yes && $answr != YES ]]; do
+ echo -e "${BRED}Disk $drv will be whiped. Are you sure you want to continue? [y/N]${END}"
+ echo -n -e "${BRED}> "
+ read -r answr
+ if [[ $answr != y && $answr != Y && $answr != yes && $answr != Yes && $answr != YES ]]; then
+ echo && echo
+ echo "Retrying..."
+ echo
+ echo "Press [retrun] key to continue"
+ read -r
+ fi
+done
#==================================================================================================#
#------------------------------------------ USERS SETUP -------------------------------------------#
#==================================================================================================#