Change: 'usr/share/i18n/SUPPORTED' is now used to list all available Locales.

Cosmetic changes
This commit is contained in:
Jane Doe 2024-05-10 18:19:33 +00:00
parent dd1a4b8eb7
commit 79e38c0ef9

View file

@ -1,7 +1,7 @@
#!/bin/bash
# Amelia Installer
# Version: 3.9
# Version: 4.0
set -euo pipefail
trap 's=$?; echo "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR
@ -343,7 +343,8 @@ ${purple}###${nc} Internet Connection Check ${purple}###${nc}
ok
else
RED "
[!] An active Internet connection is mandatory to continue "
[!] An active internet connection is mandatory to continue "
abort
fi
}
@ -403,7 +404,6 @@ ${purple}###${nc} Main Menu ${purple}###${nc}
> Make a selection:
### Select [4] for guided navigation
"
NC "
@ -499,12 +499,12 @@ ${purple}###${nc} Locale Selection ${purple}###${nc}
> Select your Locale
### [Hit ${nc}'l'${yellow} to list locales, ${nc}'down'${yellow} to search, ${nc}'q'${yellow} to quit] "
### [Hit ${nc}'l'${yellow} to list locales, then ${nc}'down'${yellow} to search or ${nc}'q'${yellow} to quit] "
BLUE "
Enter your Locale ${bwhite}(empty for 'en_US')${blue}: "
Enter your Locale ${bwhite}(empty for 'en_US.UTF-8')${blue}: "
read -p "
==> " SETLOCALE
@ -513,13 +513,13 @@ Enter your Locale ${bwhite}(empty for 'en_US')${blue}: "
sleep 0.5
YELLOW "
### 'en_US' Locale has been selected
### 'en_US.UTF-8' Locale has been selected
"
elif [[ "${SETLOCALE}" == "l" ]]; then
more /etc/locale.gen
more /usr/share/i18n/SUPPORTED
return 1
elif ! grep -q "^#\?$(sed 's/[].*[]/\\&/g' <<< "${SETLOCALE}") " /etc/locale.gen; then
elif ! grep -q "^#\?$(sed 's/[].*[]/\\&/g' <<< "${SETLOCALE}") " /usr/share/i18n/SUPPORTED; then
invalid
return 1
@ -546,7 +546,7 @@ ${purple}###${nc} Keyboard Layout Selection ${purple}###${nc}
> Select your Keyboard Layout
### [Hit ${nc}'l'${yellow} to list layouts, ${nc}'down'${yellow} to search, ${nc}'q'${yellow} to quit] "
### [Hit ${nc}'l'${yellow} to list layouts, then ${nc}'down'${yellow} to search or ${nc}'q'${yellow} to quit] "
BLUE "
@ -576,7 +576,7 @@ Enter your keyboard layout ${bwhite}(empty for 'us')${blue}: "
### '"${SETKBD}"' Keyboard Layout has been selected
"
loadkeys "${SETKBD}"
loadkeys "${SETKBD}" > /dev/null 2>&1
fi
ok
}