Changed the way Locales are being filtered at "Selecting Locale" Stage.

This commit is contained in:
Jane Doe 2024-05-17 19:19:41 +00:00
parent 669517bad9
commit 2c92e181bb

View file

@ -1,7 +1,7 @@
#!/bin/bash
# Amelia Installer
# Version: 4.3
# Version: 4.4
set -euo pipefail
trap 's=$?; echo "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR
@ -500,22 +500,22 @@ ${purple}###${nc} Locale Selection ${purple}###${nc}
Enter your Locale ${bwhite}(empty for 'en_US.UTF-8')${blue}: "
Enter your Locale ${bwhite}(empty for 'en_US.UTF-8 UTF-8')${blue}: "
read -r -p "
==> " SETLOCALE
if [[ -z "${SETLOCALE}" ]]; then
SETLOCALE="en_US.UTF-8"
SETLOCALE="en_US.UTF-8 UTF-8"
sleep 0.5
YELLOW "
### 'en_US.UTF-8' Locale has been selected
### 'en_US.UTF-8 UTF-8' Locale has been selected
"
elif [[ "${SETLOCALE}" == "l" ]]; then
more /usr/share/i18n/SUPPORTED
return 1
elif ! grep -q "^#\?$(sed 's/[].*[]/\\&/g' <<< "${SETLOCALE}") " /usr/share/i18n/SUPPORTED; then
elif ! grep -Fxq "${SETLOCALE}" /usr/share/i18n/SUPPORTED; then
invalid
return 1