From 199f4ec6acbbc80cfa46a94e51fa82f16f39680f Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Fri, 30 Jul 1999 16:34:06 +0000 Subject: Sense $LANG only if $LC_CTYPE is not set --- contrib/groff/nroff/nroff.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'contrib/groff/nroff') diff --git a/contrib/groff/nroff/nroff.sh b/contrib/groff/nroff/nroff.sh index 25d9db268824..2515968b1d2e 100755 --- a/contrib/groff/nroff/nroff.sh +++ b/contrib/groff/nroff/nroff.sh @@ -3,13 +3,12 @@ prog="$0" # Default device. -if test `expr "$LC_CTYPE" : ".*\.ISO_8859-1"` -gt 0 || \ - test `expr "$LANG" : ".*\.ISO_8859-1"` -gt 0 +locale=${LC_CTYPE:-$LANG} +if test `expr "$locale" : ".*\.ISO_8859-1"` -gt 0 then T=-Tlatin1 else -if test `expr "$LC_CTYPE" : ".*\.KOI8-R"` -gt 0 || \ - test `expr "$LANG" : ".*\.KOI8-R"` -gt 0 +if test `expr "$locale" : ".*\.KOI8-R"` -gt 0 then T=-Tkoi8-r else -- cgit v1.2.3