forked from atilacamurca/vokoscreen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpreparing.sh
More file actions
executable file
·47 lines (40 loc) · 1.16 KB
/
preparing.sh
File metadata and controls
executable file
·47 lines (40 loc) · 1.16 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
#!/bin/bash
echo ==================
echo Remove ffmpeg logs
echo ==================
rm *.log
echo ============
echo Make main.ts
echo ============
lupdate -locations none -recursive ./ -ts main.ts
echo ======================
echo Download language pack
echo ======================
tx pull -a
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>'$( ls -al pictures/*.png | sed 's/ \+/ /g' | cut -d " " -f 9 | sed 's/ \+/ /g')'</file>'
# ":" is separatorr
echo $array | sed 's: :</file>\n<file>:g' >> screencast.qrc
################
# language packs
################
array='<file>'$( ls -al language/*.ts | sed 's/ \+/ /g' | cut -d " " -f 9 | sed 's/ \+/ /g')'</file>'
# ":" is separatorr
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 Script end
echo ==========