-
-
Notifications
You must be signed in to change notification settings - Fork 92
/
preparing.sh
executable file
·117 lines (94 loc) · 3.33 KB
/
preparing.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
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#!/bin/bash
# This file is only for the main developer, so it contains a mixture of
# German and English. It does two things:
#
# 1. Looks for new words to be translated and writes them to the file
# vokoscreen-version-3.ts for later translation on Transifex.
# 2. Downloads completed translations from Transifex and writes them to
# screencast.qrc.
# Testen ob lupdate auf dem System vorhanden ist.
progname=$(which lupdate6)
if [ $? = 0 ]; then
echo
else
kdialog --title "preparing.sh" --msgbox "lupdate6 nicht auf System vorhanden. lupdate6 ist bestandteil von Programmpacket qt6-tools-linguist"
echo "[preparing.sh] lupdate6 nicht auf System vorhanden"
echo "[preparing.sh] lupdate6 ist bestandteil von Programmpacket qt6-tools-linguist"
exit 1
fi
# Testen ob tx auf dem System vorhanden ist.
progname=$(which tx)
if [ $? = 0 ]; then
echo
else
kdialog --title "preparing.sh" --msgbox "tx nicht auf System vorhanden. tx ist bestandteil von Programmpacket transifex-client"
echo "[preparing.sh] tx nicht auf System vorhanden"
echo "[preparing.sh] tx ist bestandteil von Programmpacket transifex-client"
exit 1
fi
echo ==============================
echo Create vokoscreen-version-3.ts
echo ==============================
lupdate6 -locations none -recursive ./src -ts src/vokoscreen-version-3.ts
echo =====================
echo Remove language packs
echo =====================
rm -r src/language
echo ======================
echo Download language pack
echo ======================
tx pull -a
echo =============================
echo copy language to src/language
echo =============================
cp -r language src/language
echo ===============
echo remove language
echo ===============
rm -r language
echo ====================
echo change in src folder
echo ====================
cd src
echo =========================
echo Remove old screencast.qrc
echo =========================
rm screencast.qrc
echo =====================
echo Create screencast.qrc
echo =====================
##########
# Pictures
##########
echo '<!DOCTYPE RCC><RCC version="1.0">' > screencast.qrc
echo "<qresource>" >> screencast.qrc
array="<file>"$( find ./pictures/* -name *.png | cut -c 3- )"</file>"
echo $array | sed "s/ /<\/file>\n<file>/g" >> screencast.qrc
array="<file>"$( find ./pictures/* -name *.license | cut -c 3- )"</file>"
echo $array | sed "s/ /<\/file>\n<file>/g" >> screencast.qrc
array="<file>"$( find ./pictures/* -name *.qss | cut -c 3- )"</file>"
echo $array | sed "s/ /<\/file>\n<file>/g" >> screencast.qrc
###############################
# cisco openh264 binary license
###############################
array="<file>"$( find ./ciscoOpenh264/* -name *.txt | cut -c 3- )"</file>"
echo $array | sed "s/ /<\/file>\n<file>/g" >> screencast.qrc
################
# language packs
################
array='<file>'$( ls language/*.ts )'</file>'
echo $array | sed "s/ /<\/file>\n<file>/g" >> screencast.qrc
sed -i 's/\.ts/.qm/g' screencast.qrc
echo '</qresource>' >> screencast.qrc
echo '</RCC>' >> screencast.qrc
echo =======================
echo Create translations.pri
echo =======================
############################################
# language packs write into translations.pri
############################################
array='TRANSLATIONS += '$( ls language/*.ts )
echo $array > translations.pri
echo ==========
echo Script end
echo ==========