Cosmetics (indentation).

This commit is contained in:
Tommaso Chiti 2022-05-28 13:52:40 +02:00
parent 9445b2ab50
commit 40af31b236

View file

@ -137,9 +137,7 @@ userpass_selector () {
incEcho "You need to enter a password for $username in order to continue." incEcho "You need to enter a password for $username in order to continue."
return 1 return 1
fi fi
echo
read -r -s -p "Insert the password again (you're not going to see the password): " userpass2 read -r -s -p "Insert the password again (you're not going to see the password): " userpass2
echo
if [[ "$userpass" != "$userpass2" ]]; then if [[ "$userpass" != "$userpass2" ]]; then
incEcho "Passwords don't match, please try again." incEcho "Passwords don't match, please try again."
return 1 return 1
@ -154,9 +152,7 @@ rootpass_selector () {
incEcho "You need to enter a root password." incEcho "You need to enter a root password."
return 1 return 1
fi fi
echo
read -r -s -p "Insert the password again (for double checking): " rootpass2 read -r -s -p "Insert the password again (for double checking): " rootpass2
echo
if [[ "$rootpass" != "$rootpass2" ]]; then if [[ "$rootpass" != "$rootpass2" ]]; then
incEcho "Passwords don't match, try again." incEcho "Passwords don't match, try again."
return 1 return 1
@ -193,14 +189,14 @@ locale_selector () {
'') locale="en_US.UTF-8" '') locale="en_US.UTF-8"
print "$locale will be the default locale." print "$locale will be the default locale."
return 0;; 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;;
*) if ! grep -q "^#\?$(sed 's/[].*[]/\\&/g' <<< $locale) " /etc/locale.gen; then *) if ! grep -q "^#\?$(sed 's/[].*[]/\\&/g' <<< $locale) " /etc/locale.gen; then
incEcho "The specified locale doesn't exist or isn't supported." incEcho "The specified locale doesn't exist or isn't supported."
return 1 return 1
fi fi
return 0 return 0
esac esac
} }