mirror of
https://github.com/classy-giraffe/easy-arch.git
synced 2025-11-17 19:40:55 +00:00
use layout/locale vars in print for default choice
also added 2 missing return 0's and replaced the tabs my editor keeps adding in
This commit is contained in:
parent
c07aee4269
commit
0b6c961e72
1 changed files with 10 additions and 9 deletions
19
easy-arch.sh
19
easy-arch.sh
|
|
@ -89,6 +89,7 @@ network_selector () {
|
||||||
incEcho "You did not enter a valid selection."
|
incEcho "You did not enter a valid selection."
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# Installing the chosen networking method to the system (function).
|
# Installing the chosen networking method to the system (function).
|
||||||
|
|
@ -131,7 +132,7 @@ lukspass_selector () {
|
||||||
incEcho "Passwords don't match, try again."
|
incEcho "Passwords don't match, try again."
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# User enters a password for the user account (function).
|
# User enters a password for the user account (function).
|
||||||
|
|
@ -148,7 +149,7 @@ userpass_selector () {
|
||||||
incEcho "Passwords don't match, try again."
|
incEcho "Passwords don't match, try again."
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# User enters a password for the root account (function).
|
# User enters a password for the root account (function).
|
||||||
|
|
@ -165,7 +166,7 @@ rootpass_selector () {
|
||||||
incEcho "Passwords don't match, try again."
|
incEcho "Passwords don't match, try again."
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# Microcode detector (function).
|
# Microcode detector (function).
|
||||||
|
|
@ -194,8 +195,9 @@ hostname_selector () {
|
||||||
locale_selector () {
|
locale_selector () {
|
||||||
read -r -p "Please insert the locale you use (format: xx_XX. Enter empty to use en_US, or \"/\" to search locales): " locale
|
read -r -p "Please insert the locale you use (format: xx_XX. Enter empty to use en_US, or \"/\" to search locales): " locale
|
||||||
case $locale in
|
case $locale in
|
||||||
'') print "en_US.UTF-8 will be the default locale."
|
'') locale="en_US.UTF-8"
|
||||||
locale="en_US.UTF-8";;
|
print "$locale will be the default locale."
|
||||||
|
return 0;;
|
||||||
'/') sed -E '/^# +|^#$/d;s/^#| *$//g;s/ .*/ (Charset:&)/' /etc/locale.gen | less -M
|
'/') sed -E '/^# +|^#$/d;s/^#| *$//g;s/ .*/ (Charset:&)/' /etc/locale.gen | less -M
|
||||||
clear
|
clear
|
||||||
return 1;;
|
return 1;;
|
||||||
|
|
@ -211,8 +213,8 @@ locale_selector () {
|
||||||
keyboard_selector () {
|
keyboard_selector () {
|
||||||
read -r -p "Please insert the keyboard keymap/layout to use in console (enter empty to use us, or \"/\" to search keymaps): " kblayout
|
read -r -p "Please insert the keyboard keymap/layout to use in console (enter empty to use us, or \"/\" to search keymaps): " kblayout
|
||||||
case $kblayout in
|
case $kblayout in
|
||||||
'') print "The us keymap will be used in console by default."
|
'') kblayout="us"
|
||||||
kblayout="us"
|
print "$kblayout will be the default console keymap."
|
||||||
return 0;;
|
return 0;;
|
||||||
'/') localectl list-keymaps
|
'/') localectl list-keymaps
|
||||||
clear
|
clear
|
||||||
|
|
@ -245,8 +247,7 @@ done
|
||||||
# Warn user about deletion of old partition scheme.
|
# Warn user about deletion of old partition scheme.
|
||||||
echo -en "${BOLD}${BRED}This will delete the current partition table on $DISK once installation starts. Do you agree [y/N]?:${RESET} "
|
echo -en "${BOLD}${BRED}This will delete the current partition table on $DISK once installation starts. Do you agree [y/N]?:${RESET} "
|
||||||
read -r disk_response
|
read -r disk_response
|
||||||
disk_response=${disk_response,,}
|
if ! [[ "${disk_response,,}" =~ ^(yes|y)$ ]]; then
|
||||||
if ! [[ "$disk_response" =~ ^(yes|y)$ ]]; then
|
|
||||||
print "Quitting."
|
print "Quitting."
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue