Fixed French translations (#4875)
[opentx.git] / tools / release22 / build-sdcard.sh
blobe7718f8f230a045760c62ca87490eb1020369970
1 #!/bin/bash
3 set -e
5 branch=master
6 workdir=/home/opentx/release22
7 output=/var/www/html/2.2
9 # Handle opentx.sdcard.version
10 sdcard_version="2.2V"$(grep 'set(SDCARD_REVISION' ${workdir}/code/CMakeLists.txt | grep -o '".*"' | sed 's/"//g')
11 echo ${sdcard_version} > ${workdir}/code/radio/sdcard/horus/opentx.sdcard.version
12 echo ${sdcard_version} > ${workdir}/code/radio/sdcard/taranis-x9/opentx.sdcard.version
13 echo ${sdcard_version} > ${workdir}/code/radio/sdcard/taranis-x7/opentx.sdcard.version
15 if cmp --silent ${workdir}/code/radio/sdcard/horus/opentx.sdcard.version ${workdir}/opentx.sdcard.version
16 then
17 exit
18 else
19 cp -r ${workdir}/code/radio/sdcard/horus/opentx.sdcard.version ${workdir}
20 cd ${workdir}
22 # Copy git sdcard data
23 rm -Rf ${workdir}/sdcard
24 cp -r ${workdir}/code/radio/sdcard .
26 # Get images for Horus
27 mkdir -p ${workdir}/sdcard/horus/IMAGES
28 cp /home/opentx/horus-bitmaps/* ${workdir}/sdcard/horus/IMAGES/
30 # Request sound pack generation
31 python3 -B ${workdir}/code/tools/release22/tts.py en csv files
32 python3 -B ${workdir}/code/tools/release22/tts.py fr csv files
33 python3 -B ${workdir}/code/tools/release22/tts.py es csv files
34 python3 -B ${workdir}/code/tools/release22/tts.py it csv files
35 python3 -B ${workdir}/code/tools/release22/tts.py de csv files
37 # Create sdcards.zips for supported platforms
38 mv /tmp/SOUNDS ${workdir}/sdcard/horus/
39 mkdir ${workdir}/sdcard/taranis-x9/SOUNDS
40 mkdir ${workdir}/sdcard/taranis-x7/SOUNDS
41 cp -r ${workdir}/sdcard/horus/SOUNDS ${workdir}/sdcard/taranis-x9/
42 cp -r ${workdir}/sdcard/horus/SOUNDS ${workdir}/sdcard/taranis-x7/
43 cd ${workdir}/sdcard/horus && zip -r ${output}/sdcard/x12/sdcard-horus-${sdcard_version}.zip *
44 cd ${workdir}/sdcard/taranis-x9 && zip -r ${output}/sdcard/x9/sdcard-taranis-x9-${sdcard_version}.zip *
45 cd ${workdir}/sdcard/taranis-x7 && zip -r ${output}/sdcard/x7/sdcard-taranis-x7-${sdcard_version}.zip *
46 rm -Rf ${workdir}/sdcard