]> git.wh0rd.org Git - home.git/commitdiff
dont run locale if the system doesnt have it
authorMike Frysinger <vapier@gentoo.org>
Fri, 4 Sep 2009 02:33:03 +0000 (22:33 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sat, 28 Apr 2012 19:36:08 +0000 (15:36 -0400)
.profile.d/locale.sh

index dbb8d4294a1646c88d63a4d810b9679bf6f1ab61..a7daa1ea4258b872e9ff6b234ecd63a9853e115c 100644 (file)
@@ -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