aboutsummaryrefslogtreecommitdiffstats
path: root/joes-arch-install.sh
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2019-11-28 13:13:44 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2019-11-28 13:13:44 +0100
commit7cea0acecc6ae9b99fae64d87a855e4e2bbf0d58 (patch)
treecb917cb900bb6602b2198548e1db5eeb5dda85f9 /joes-arch-install.sh
parentUsr can choose his shell now (diff)
downloadarch-installer-7cea0acecc6ae9b99fae64d87a855e4e2bbf0d58.tar.gz
arch-installer-7cea0acecc6ae9b99fae64d87a855e4e2bbf0d58.tar.bz2
arch-installer-7cea0acecc6ae9b99fae64d87a855e4e2bbf0d58.tar.xz
arch-installer-7cea0acecc6ae9b99fae64d87a855e4e2bbf0d58.tar.zst
arch-installer-7cea0acecc6ae9b99fae64d87a855e4e2bbf0d58.zip
Username can't be empty anymore
Diffstat (limited to 'joes-arch-install.sh')
-rwxr-xr-xjoes-arch-install.sh21
1 files changed, 15 insertions, 6 deletions
diff --git a/joes-arch-install.sh b/joes-arch-install.sh
index 285ba4e..d3d5bac 100755
--- a/joes-arch-install.sh
+++ b/joes-arch-install.sh
@@ -229,12 +229,21 @@ jo_get_usr_config() {
if dialog --title "$1"\
--yesno "Would you like to add a user to the system?"\
6 45; then
- usr=$(dialog\
- --nocancel --title "$1"\
- --inputbox "Enter your desired username:"\
- 7 40\
- 3>&1 1>&2 2>&3 3>&-)
- usr=$(echo "$usr" | tr '[:upper:]' '[:lower:]')
+ gogogo=false
+ while [ "$gogogo" = false ]; do
+ usr=$(dialog\
+ --nocancel --title "$1"\
+ --inputbox "Enter your desired username:"\
+ 7 40\
+ 3>&1 1>&2 2>&3 3>&-)
+ if [ "$usr" = "" ]; then
+ dialog --msgbox "Username can't be empty" 5 28
+ gogogo=false
+ else
+ usr=$(echo "$usr" | tr '[:upper:]' '[:lower:]')
+ gogogo=true
+ fi
+ done
isusr=true
gogogo=false
while [ "$gogogo" = false ]; do