1
0
mirror of https://github.com/ru-de/faq.git synced 2024-11-21 09:52:19 +00:00

fix ci dictionary release (#568)

* fix ci dictionary release

* fix link

* add debug

* add debug

* fix download dict
This commit is contained in:
Evgeniy Sokolov 2020-10-15 21:36:01 +02:00 committed by GitHub
parent 6b686e42ea
commit e9b18b67cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,11 +5,10 @@ set -xe
DIR=`dirname $0`
apt-get -yqq update && apt-get install -y hunspell hunspell-ru hunspell-en-us hunspell-de-de jq
curl -s https://extensions.libreoffice.org/extensions/russian-spellcheck-dictionary.-based-on-works-of-aot-group > .dict_page
cat .dict_page | grep -oP "<a href.+title=\"Current release for the project\"" | grep -oP "https://extensions.libreoffice.org/extensions/russian-spellcheck-dictionary.-based-on-works-of-aot-group/[^\"]+" > .current_release
echo -n $(cat .current_release) > .current_release
echo -n "/@@download[^\"]+" >> .current_release
cat .dict_page | grep -oP -f .current_release | wget -q -i - -O /tmp/dictionary.otx
curl -s https://extensions.libreoffice.org/en/extensions/show/russian-spellcheck-dictionary > .dict_page
echo -n "https://extensions.libreoffice.org" > .current_release
strings .dict_page | grep -ozP '<li class="releaseRow">(\n|.)*?</li>' | grep -zoP 'href=".*?">Download' | head -1 | sed 's/href="//' | sed 's/">Download//' >> .current_release
cat .current_release | wget -q -i - -O /tmp/dictionary.otx
unzip /tmp/dictionary.otx -d /tmp
cp /tmp/*.dic /usr/share/hunspell
cp /tmp/*.aff /usr/share/hunspell