From 70607640ee0cd311ae99d4b04ac5908d54edb422 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 3 Sep 2009 22:33:03 -0400 Subject: [PATCH] dont run locale if the system doesnt have it --- .profile.d/locale.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.profile.d/locale.sh b/.profile.d/locale.sh index dbb8d42..a7daa1e 100644 --- a/.profile.d/locale.sh +++ b/.profile.d/locale.sh @@ -2,8 +2,10 @@ export LANG case ${TERM} in Eterm) LANG="en_US";; *) - for LANG in en_US.UTF8 en_US.UTF-8 "" ; do - locale | grep -q "^LC.*${LANG}" && break - done + if type -P locale > /dev/null ; then + for LANG in en_US.UTF8 en_US.UTF-8 "" ; do + locale | grep -q "^LC.*${LANG}" && break + done + fi ;; esac -- 2.39.5