-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathautogen.sh
More file actions
executable file
·61 lines (55 loc) · 1.32 KB
/
autogen.sh
File metadata and controls
executable file
·61 lines (55 loc) · 1.32 KB
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
51
52
53
54
55
56
57
58
59
60
#!/bin/sh
# Script for regenerating all autogenerated files.
if [ -f /usr/local/share/gettext/gettext.h ]; then
cp /usr/local/share/gettext/gettext.h gettext.h
else
if [ -f /usr/share/gettext/gettext.h ]; then
cp /usr/share/gettext/gettext.h gettext.h
else
echo "You should have gettext package installed."
exit
fi
fi
if [ -f /usr/local/share/aclocal/libtool.m4 ]; then
cp /usr/local/share/aclocal/libtool.m4 ./aclocal.m4
else
if [ -f /usr/share/aclocal/libtool.m4 ]; then
cp /usr/share/aclocal/libtool.m4 ./aclocal.m4
else
echo "You should have libtool package installed."
exit
fi
fi
autopoint -f
libtoolize -c -f
aclocal -I m4
autoheader &&
automake --gnu -c -a &&
autoconf &&
autoheader
# Regenerate language files for gettext
if [ -f po/POTFILES.in ]; then
rm -f po/POTFILES.in
fi
touch po/POTFILES.in
find ./src -name '*.cpp' >>po/POTFILES.in
find ./src -name '*.h' >>po/POTFILES.in
xgettext -k_ -f po/POTFILES.in -C -F -o libdcl.pot -p po
cd po
rm -rf LINGUAS
touch LINGUAS
if [ -f *.po ]; then
for f in *.po; do
lang=`echo $f | sed -e 's,\.po$,,'`
msgmerge -U $lang.po libdcl.pot
msgfmt -c -o $lang.gmo $lang.po
echo $lang >>LINGUAS
done
fi
cd ..
# Fix permissions
find . -type d -exec chmod ugo+rwx,o-w '{}' ';'
find . -type f -exec chmod ugo+rw,ugo-x,o-w '{}' ';'
chmod ugo+x *.sh
chmod ugo+x debian/rules
chmod ugo+x configure