-
Notifications
You must be signed in to change notification settings - Fork 5
/
build-oxt-all.sh
executable file
·98 lines (77 loc) · 3.53 KB
/
build-oxt-all.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
ID="softcatala.catalan.dictionary.dev"
IDvalencian="softcatala.catalan.valencian.dictionary.dev"
TAG="-test"
VERSION="9.9.9"
YEAR=$(date "+%Y")
current_time=$(date "+%Y%m%d%H%M%S")
DEV=".dev.$current_time"
echo "Downloading thesaurus latest version..."
rm oxt/thes/*
wget https://github.com/Softcatala/sinonims-cat/releases/latest/download/th_ca_ES.dat -O oxt/thes/th_ca_ES.dat
wget https://github.com/Softcatala/sinonims-cat/releases/latest/download/th_ca_ES.idx -O oxt/thes/th_ca_ES.idx
wget https://github.com/Softcatala/sinonims-cat/releases/latest/download/README.txt -O oxt/thes/README_thes_ca.txt
while getopts "pv:" opt; do
case "$opt" in
p) ID="softcatala.catalan.dictionary"; IDvalencian="softcatala.catalan.valencian.dictionary"; TAG=""; DEV="";
;;
v) VERSION=$OPTARG;
;;
esac
done
echo $ID
echo $TAG
echo $VERSION
# Catalan and Valencian, Thesaurus and Hyphenation. For LibO ('ca' and 'ca-valencia') and AAO ('ca' only)
cd oxt/ca
cp config_build.sh.pre config_build.sh
cp description.xml.pre description.xml
cp dictionaries.xcu.pre dictionaries.xcu
cp package-description.txt.pre package-description.txt
sed -i -e s/\#\#VERSION\#\#/$VERSION/g config_build.sh
sed -i -e s/\#\#DEV\#\#/$DEV/g config_build.sh
sed -i -e s/\#\#ID\#\#/$ID/g description.xml description.xml
sed -i -e s/\#\#VERSION\#\#/$VERSION/g description.xml description.xml
sed -i -e s/\#\#VERSION\#\#/$VERSION/g package-description.txt package-description.txt
cp -rf ../../resultats/hunspell/catalan.aff ca.aff
cp -rf ../../resultats/hunspell/catalan.dic ca.dic
cp -rf ../../resultats/hunspell/catalan-valencia.aff ca-ES-valencia.aff
cp -rf ../../resultats/hunspell/catalan-valencia.dic ca-ES-valencia.dic
cp -rf ../hyph/hyph_ca.dic hyph_ca.dic
cp -rf ../hyph/README_hyph_ca.txt README_hyph_ca.txt
cp -rf ../thes/th_ca_ES.dat th_ca_ES.dat
cp -rf ../thes/th_ca_ES.idx th_ca_ES.idx
cp -rf ../thes/README_thes_ca.txt README_thes_ca.txt
cp -rf root_files/LICENSES-en.txt LICENSES-en.txt
cp -rf root_files/LLICENCIES-ca.txt LLICENCIES-ca.txt
cp -rf root_files/SC-logo.png SC-logo.png
echo "Copiant README a oxt ca"
cp -rf ../../README.txt README.txt
sed -i -e s/\#\#VERSION\#\#/$VERSION/g README.txt README.txt
sed -i -e s/\#\#YEAR\#\#/$YEAR/g README.txt README.txt
../../build-oxt.sh config_build.sh
rm -rf config_build.sh config_build.sh description.xml dictionaries.xcu package-description.txt
# Valencian, for AOO only (using 'ca' locale)
echo $IDvalencian
echo $TAG
echo $VERSION
cd ../ca-valencia
cp config_build.sh.pre config_build.sh
cp description.xml.pre description.xml
cp dictionaries.xcu.pre dictionaries.xcu
cp package-description.txt.pre package-description.txt
cp -rf root_files/LICENSES-en.txt LICENSES-en.txt
cp -rf root_files/LLICENCIES-ca.txt LLICENCIES-ca.txt
cp -rf root_files/SV-logo.png SV-logo.png
echo "Copiant README a oxt va"
cp -rf ../../README.txt README.txt
sed -i -e s/\#\#VERSION\#\#/$VERSION/g README.txt README.txt
sed -i -e s/\#\#YEAR\#\#/$YEAR/g README.txt README.txt
sed -i -e s/\#\#VERSION\#\#/$VERSION/g config_build.sh
sed -i -e s/\#\#DEV\#\#/$DEV/g config_build.sh
sed -i -e s/\#\#ID\#\#/$IDvalencian/g description.xml description.xml
sed -i -e s/\#\#VERSION\#\#/$VERSION/g description.xml description.xml
sed -i -e s/\#\#VERSION\#\#/$VERSION/g package-description.txt package-description.txt
cp -rf ../../resultats/hunspell/catalan-valencia.aff ca.aff
cp -rf ../../resultats/hunspell/catalan-valencia.dic ca.dic
../../build-oxt.sh config_build.sh
rm -rf config_build.sh config_build.sh description.xml dictionaries.xcu package-description.txt