aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2019-11-27 15:56:01 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2019-11-27 15:56:01 +0100
commitce2709ba0f446ab275bbc69ccc6d6328c323fd7b (patch)
tree153873215c9263e5e10fc81ee2ab9a57e8ba31e3
parentDialoged swap size prompt (diff)
downloadarch-installer-ce2709ba0f446ab275bbc69ccc6d6328c323fd7b.tar.gz
arch-installer-ce2709ba0f446ab275bbc69ccc6d6328c323fd7b.tar.bz2
arch-installer-ce2709ba0f446ab275bbc69ccc6d6328c323fd7b.tar.xz
arch-installer-ce2709ba0f446ab275bbc69ccc6d6328c323fd7b.tar.zst
arch-installer-ce2709ba0f446ab275bbc69ccc6d6328c323fd7b.zip
Dialoged root prompt
-rwxr-xr-xjoes-arch-install.sh23
1 files changed, 21 insertions, 2 deletions
diff --git a/joes-arch-install.sh b/joes-arch-install.sh
index 1fc748b..592e147 100755
--- a/joes-arch-install.sh
+++ b/joes-arch-install.sh
@@ -18,7 +18,6 @@ isusr=false
intelamdcpu="none"
intelamdgpu="none"
numregex='^[0-9]+$'
-gogogo=false
if [ ! -r /sys/firmware/efi/efivars ]; then
efimode=false
else
@@ -121,14 +120,17 @@ awk '{print $1"-------("$4")";}' | sed -n "$id"p) " >> blkfile
$(cat blkfile)\
3>&1 1>&2 2>&3 3>&-)
drv=$(lsblk | grep disk | awk '{print $1}' | sed -n "$sel"p)
+ rm -f blkfile
}
jo_get_swap_size() {
+ gogogo=false
while [ "$gogogo" = false ]; do
swps=$(dialog\
--nocancel --title "$1"\
--inputbox "Please enter your swap partition disired size: (__G)"\
7 65\
+ "4"\
3>&1 1>&2 2>&3 3>&-)
if [ "$swps" = "" ]; then
dialog --msgbox "Can't be empty. Retrying..." 5 32
@@ -143,7 +145,24 @@ jo_get_swap_size() {
}
jo_get_root_size() {
-
+ gogogo=false
+ while [ "$gogogo" = false ]; do
+ rts=$(dialog\
+ --nocancel --title "$1"\
+ --inputbox "Please enter your swap partition disired size: (__G)"\
+ 7 65\
+ "25"\
+ 3>&1 1>&2 2>&3 3>&-)
+ if [ "$rts" = "" ]; then
+ dialog --msgbox "Can't be empty. Retrying..." 5 32
+ gogogo=false
+ elif ! [[ $rts =~ $numregex ]]; then
+ dialog --msgbox "Illegal value, please enter only numerical values. Retrying..." 6 38
+ gogogo=false
+ else
+ gogogo=true
+ fi
+ done
}
jo_get_continue() {