#!/bin/sh

euc_lmfinstall()
{
sh ./lmfinstall.euc
}

shj_lmfinstall()
{
sh ./lmfinstall.sj
}

std_lmfinstall()
{
sh ./lmfinstall.std
}


# First work out what LC_MESSAGES is current.
curlng=`locale | fgrep LC_MESSAGES | tr '=' ' ' | awk '{print $2}' | tr '\"' '\0'`

# FORCE LC_CTYPE to agree with LC_MESSAGES. 
# Unreadable system messages can occur without this.
LC_CTYPE=$LC_MESSAGES
export LC_CTYPE

#
# Based on this, either run the Japanese EUC, the Shiftjis or English
# install script.
#
if [ "$curlng" = "ja_JP" ] || [ "$curlng" = "ja_JP.eucJP" ]
then
euc_lmfinstall
else
if [ "$curlng" = "ja_JP.SJIS" ]
then
shj_lmfinstall
else
std_lmfinstall
fi
fi


