From fd41fd2973e1e21c506183fabe1737ee340f0799 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Mon, 15 Feb 2021 15:52:10 +0000 Subject: [PATCH] Check if the locale is installed --- roles/home-cli/files/shrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/home-cli/files/shrc b/roles/home-cli/files/shrc index 0b00259..00e990e 100644 --- a/roles/home-cli/files/shrc +++ b/roles/home-cli/files/shrc @@ -102,6 +102,10 @@ case "$LANG" in PAPERSIZE="a4" ;; esac +if [ -x /usr/bin/locale ] && [ $(locale -a 2>/dev/null | grep ${LANG-invalid} | sed 's/UTF-8//' | wc -l) -eq 0 ]; then + LANG=C + LANGUAGE=C:en +fi export LANG export LANGUAGE export PAPERSIZE