]> err.no Git - dotfiles/commitdiff
try setting lang from available locales using localedef if locale -a
authortfheen <tfheen@8da78d58-1cd3-0310-bee5-d77bd1b3e8bf>
Mon, 16 Jun 2003 18:25:36 +0000 (18:25 +0000)
committertfheen <tfheen@8da78d58-1cd3-0310-bee5-d77bd1b3e8bf>
Mon, 16 Jun 2003 18:25:36 +0000 (18:25 +0000)
fails.

git-svn-id: file:///svn/tfheen/trunk/dotfiles@162 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf

environment

index 54e9b1d6855168c128afe3a377fbfa70f79c0137..16527ced9c3772a9e924ec3e1a698ead64b4f133 100644 (file)
@@ -34,7 +34,7 @@ LESS="-m"
 RSYNC_RSH=ssh
 CVS_RSH=ssh
 PILOTRATE=115200
-PILOTPORT=/dev/tts/0
+PILOTPORT=/dev/usb/tts/0
 #MAIL=/var/spool/mail/tfheen
 DEBEMAIL=tfheen@debian.org
 DEBFULLNAME="Tollef Fog Heen"
@@ -64,6 +64,19 @@ if type -p locale > /dev/null 2>&1; then
     fi
 fi
 
+if [ -z "$LANG" ]|| [ "$LANG" = "C" ]; then
+    if type -p localedef > /dev/null 2>&1; then
+        localedef --list-archive > /dev/null 2>&1
+        if test "$?" = "0"; then
+            if localedef --list-archive | grep -q '^no_NO$' ; then
+                LANG=no_NO
+            elif localedef --list-archive | grep -q '^en_US$'; then
+                LANG=en_US
+            fi
+        fi
+    fi
+fi
+
 case "$DOMAINNAME" in
     idi.ntnu.no|stud.ntnu.no)
         XTERM=Eterm