]> gitweb.fperrin.net Git - DictionaryPC.git/blob - genv6.sh
Attempt at using maven for compilation
[DictionaryPC.git] / genv6.sh
1 set -e
2 rm -rf data/outputsv6
3 mkdir data/outputsv6
4 for i in data/outputs/*.quickdic ; do
5     o=data/outputsv6/$(basename "$i")
6     ./convert_to_v6.sh "$i" "$o"
7     7z a -mx=9 "$o".v006.zip "$o"
8     rm "$o"
9     # skipHtml makes no sense for single-language dictionaries
10     if echo "$o" | grep -q '-' ; then
11         if ./convert_to_v6.sh "$i" "$o" skipHtmlOpt ; then
12             7z a -mx=9 "$o".small.v006.zip "$o"
13             rm "$o"
14         elif [ $? -ne 3 ] ; then
15             # Check for magic 3 indicating "no HTML entries in dictionary"
16             echo "Converting dictionary failed!"
17             exit 1
18         fi
19     fi
20 done