-
Notifications
You must be signed in to change notification settings - Fork 0
/
mkconfig
executable file
·35 lines (29 loc) · 869 Bytes
/
mkconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#! /bin/sh
# Converts native language names into english ones and configures the files
if [ $# -lt 2 ]
then
echo "Not enough parameters given"
exit
fi
english()
{
lang=$1; shift
case $lang in
dansk) echo "danish";;
deutsch) echo "german";;
english) echo "english";;
espanyol) echo "spanish";;
francaise) echo "french";;
italiano) echo "italian";;
nederlands) echo "dutch";;
svenska) echo "swedish";;
portugues) echo "brazil,brazilian";;
esac
}
echo "% This file is written automatically by mkconfig" > config.tex
echo >> config.tex
printf '\\newcommand{\\firstlang}{%s}\n' $1 >> config.tex
printf '\\newcommand{\\firstbabel}{%s}\n' `english $1` >> config.tex
echo >> config.tex
printf '\\newcommand{\\secondlang}{%s}\n' $2 >> config.tex
printf '\\newcommand{\\secondbabel}{%s}\n' `english $2` >> config.tex