From: Mike Frysinger Date: Fri, 4 Sep 2009 02:33:03 +0000 (-0400) Subject: dont run locale if the system doesnt have it X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=70607640ee0cd311ae99d4b04ac5908d54edb422;p=home.git dont run locale if the system doesnt have it --- 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