home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.uv.es
/
2014.11.ftp.uv.es.tar
/
ftp.uv.es
/
pub
/
unix
/
elm-2.4-pl20.tar.Z
/
elm-2.4-pl20.tar
/
nls
/
Install
next >
Wrap
Text File
|
1991-10-20
|
1KB
|
51 lines
# This shell script is called with 2 arguments as
# Install LangFile Gencat CatName
# It reads the file LANGS, and parses the lines in it. Each line
# is assumed to have 2 fields. The first is the relative directory
# path to the message catalog input for a particular language.
# The second field is the name of the destination directory into
# which the resulting message catalog should be placed. The second
# argument to Install is used as the name of the message catalog
# in each destination directory.
case $# in
3) ;;
*) echo "usage: $0 LangFile CatName"
exit 1
;;
esac
LANGFILE=$1
GENCAT=$2
CATNAME=$3
if [ ! -r "$LANGFILE" ]
then
echo "Can not open \"$LANGFILE\" for reading"
exit 1
fi
while read InDir DestDir
do
if [ -z "$InDir" ]
then
continue
fi
if [ "$InDir" = "#" ]
then
continue
fi
if [ ! -d $InDir ]
then
echo "\"$InDir\" is not a directory"
continue
fi
if [ ! -d $DestDir ]
then
echo "\"$DestDir\" is not a directory"
continue
fi
/bin/rm -f $DestDir/$CATNAME
echo "$GENCAT $DestDir/$CATNAME $InDir/*.m"
$GENCAT $DestDir/$CATNAME $InDir/*.m
done < $LANGFILE