aboutsummaryrefslogtreecommitdiff
path: root/contrib/groff/src/roff/nroff/nroff.sh
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/groff/src/roff/nroff/nroff.sh')
-rwxr-xr-xcontrib/groff/src/roff/nroff/nroff.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/contrib/groff/src/roff/nroff/nroff.sh b/contrib/groff/src/roff/nroff/nroff.sh
index 25d9db268824..2515968b1d2e 100755
--- a/contrib/groff/src/roff/nroff/nroff.sh
+++ b/contrib/groff/src/roff/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