-
Notifications
You must be signed in to change notification settings - Fork 686
Expand file tree
/
Copy pathgetPoFromWebsite.sh
More file actions
executable file
·59 lines (50 loc) · 1.51 KB
/
getPoFromWebsite.sh
File metadata and controls
executable file
·59 lines (50 loc) · 1.51 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
#!/bin/bash
# options
if ! wget -q "http://translations.batocera.org/?q=updatable&type=options" -O - |
while read L
do
echo -n "updating ${L}..." >&2
if ! test -d "package/batocera/emulationstation/batocera-es-system/locales/${L}"
then
echo "directory package/batocera/emulationstation/batocera-es-system/locales/${L} doesn't exist" >&2
exit 1
fi
TARGET="package/batocera/emulationstation/batocera-es-system/locales/${L}/batocera-es-system.po"
if ! wget -q "http://translations.batocera.org/po/options_${L}.po" -O "${TARGET}"
then
echo "unable to find file on translations.batocera.org" >&2
exit 1
fi
printf "\t"
dos2unix "${TARGET}" 2>/dev/null
msgfmt --statistics "${TARGET}"
done
then
echo "failed" >&2
exit 1
fi
# bcc
if ! wget -q "http://translations.batocera.org/?q=updatable&type=bcc" -O - |
while read L
do
echo -n "updating ${L}..." >&2
if ! test -d "package/batocera/core/batocera-controlcenter/locales/${L}"
then
echo "directory package/batocera/core/batocera-controlcenter/locales/${L} doesn't exist" >&2
exit 1
fi
TARGET="package/batocera/core/batocera-controlcenter/locales/${L}/controlcenter.po"
if ! wget -q "http://translations.batocera.org/po/bcc_${L}.po" -O "${TARGET}"
then
echo "unable to find file on translations.batocera.org" >&2
exit 1
fi
printf "\t"
dos2unix "${TARGET}" 2>/dev/null
msgfmt --statistics "${TARGET}"
done
then
echo "failed" >&2
exit 1
fi
exit 0