-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfigure
executable file
·50 lines (41 loc) · 958 Bytes
/
configure
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh
MSGFMT_EXEC=$(which msgfmt)
msg() {
echo "==> $1"
}
msg2() {
echo " --> $1"
}
genTranslations() {
if [[ -d "$1" ]]; then
main_dir="$(pwd)"
for lang_dir in "$1"/*; do
if [[ -d "$lang_dir" ]]; then
msg "Entering in the target directory '$lang_dir':"
cd "${lang_dir}/LC_MESSAGES"
for pofile in *.po; do
mofile="${pofile/.po}.mo"
msg2 "building translation file: $pofile >>> $mofile"
$MSGFMT_EXEC -o "${mofile}" "${pofile}"
done
fi
cd "$main_dir"
done
else
msg2 "'$1' is not a directory"
fi
echo ""
}
echo ""
echo "-----------------------------------"
echo "Generating message translations... "
echo "-----------------------------------"
echo ""
genTranslations "src/crtwo2fits/data/lang"
echo "Generating man files..."
python generate-man.py
echo ""
#echo "Building source package..."
#python setup.py sdist
#echo ""
echo "Done!"