From e5c39edc65addd12c6f8547ee1cfd6c700b44451 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Tue, 15 Nov 2022 21:44:26 +0000 Subject: [PATCH] Create locale file if it does not exist --- roles/home-cli/files/profile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/home-cli/files/profile b/roles/home-cli/files/profile index e764005..eb3613b 100644 --- a/roles/home-cli/files/profile +++ b/roles/home-cli/files/profile @@ -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"