-
-
Notifications
You must be signed in to change notification settings - Fork 57
/
buildzip.sh
executable file
·30 lines (24 loc) · 1.42 KB
/
buildzip.sh
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
#!/bin/bash
# Missing the below tools won't break the zip build, but this does prevent translatons
# & schemas being rebuilt (if there are changes). Releases should always be built with
# the tools, but test builds in VMs it (generally) should be ok
glib-compile-schemas schemas/
intltool-extract --type=gettext/glade ui/prefsadw.ui
intltool-extract --type=gettext/glade ui/carousel4.ui
xgettext -k -k_ -kN_ --omit-header -o locale/BingWallpaper.pot ui/prefsadw.ui.h ui/carousel4.ui.h ui/intervals.utils.js.h extension.js prefs.js blur.js utils.js --from-code=UTF-8
DATE=`date +"%F"`
echo "# Translation status of statements as at $DATE:" > translations.txt
MSGCOUNT=`cat locale/BingWallpaper.pot | grep -c -e msgid`
for D in locale/*; do
if [ -d "${D}" ]; then
msgfmt --template=BingWallpaper.pot --statistics --verbose -o "${D}/LC_MESSAGES/BingWallpaper.mo" "${D}/LC_MESSAGES/BingWallpaper.po" 2>&1 | cat >> translations.txt
# your processing here
if [ $? -ne 0 ]; then
echo "ERROR processing $D translations:"
msgfmt --template=BingWallpaper.pot -o "${D}/LC_MESSAGES/BingWallpaper.mo" "${D}/LC_MESSAGES/BingWallpaper.po"
fi
fi
done
zip -r [email protected] *
zip -d [email protected] screenshot/* screenshot *.sh npm-debug.log icons/original/* .* translations.txt *.h package.json *.po *.pot test.js