Create locale file if it does not exist

This commit is contained in:
Anthony Rose 2022-11-15 21:44:26 +00:00
parent 5bc6e33d2f
commit e5c39edc65

View file

@ -39,6 +39,10 @@ fi
# Locale and language.
## Clear the existing locale settings and set options I always want.
export TZ=Europe/London # Can override this elsewhere if needed.
if ! [ -f "$XDG_CONFIG_HOME/locale.conf" ] && [ -x /usr/bin/locale ]
then
LANG="en_GB.UTF-8" /usr/bin/locale > "$XDG_CONFIG_HOME/locale.conf"
fi
if [ -r "$XDG_CONFIG_HOME/locale.conf" ]
then
. "$XDG_CONFIG_HOME/locale.conf"