1
0
mirror of https://github.com/ru-de/faq.git synced 2024-11-30 06:12:19 +00:00
faq-de/pages/files/ci/check-install.sh

46 lines
1.9 KiB
Bash
Raw Normal View History

#!/bin/bash
2018-02-13 22:40:30 +00:00
set -xe
2020-11-12 22:42:41 +00:00
PWD_DIR=`pwd`
2018-05-06 00:29:15 +00:00
DIR=`dirname $0`
2020-11-12 22:42:41 +00:00
apt-get -yqq update && apt-get install -y curl wget unzip binutils hunspell hunspell-ru hunspell-en-us hunspell-de-de jq
2020-10-15 19:37:57 +00:00
curl -s https://extensions.libreoffice.org/en/extensions/show/russian-spellcheck-dictionary > .dict_page
echo -n "https://extensions.libreoffice.org" > .current_release
2020-11-12 22:42:41 +00:00
strings .dict_page | grep -ozP '<li class="releaseRow">(\n|.)*?</li>' | grep -zoP -m 1 'href=".*?">Download' | head -1 | sed 's/href="//' | sed 's/">Download//' >> .current_release
2020-10-15 19:37:57 +00:00
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
chmod +r /usr/share/hunspell/*
dicList=""russian-aot""
for dic in $dicList
do
cat /usr/share/hunspell/$dic.dic | iconv --from KOI8-R --to UTF-8 > /usr/share/hunspell/$dic-utf8.dic
cat /usr/share/hunspell/$dic.aff | iconv --from KOI8-R --to UTF-8 | sed 's/SET KOI8-R/SET UTF-8/' > /usr/share/hunspell/$dic-utf8.aff
done
dicList=""de_DE" "en_US""
for dic in $dicList
do
cat /usr/share/hunspell/$dic.dic | iconv --from ISO8859-1 --to UTF-8 > /usr/share/hunspell/$dic-utf8.dic
cat /usr/share/hunspell/$dic.aff | iconv --from ISO8859-1 --to UTF-8 | sed 's/SET ISO8859-1/SET UTF-8/' > /usr/share/hunspell/$dic-utf8.aff
done
2018-08-08 19:42:33 +00:00
(cat $DIR/dictionary.dic; echo) | sed '/^$/d' | wc -l > /tmp/dictionary.dic
(cat $DIR/dictionary.dic; echo) | sed '/^$/d' >> /tmp/dictionary.dic
echo "SET UTF-8" >> /tmp/dictionary.aff
mv /tmp/dictionary.* /usr/share/hunspell
2018-06-07 20:10:19 +00:00
go get -u github.com/ewgRa/ci-utils/cmd/diff_liner
go get -u github.com/ewgRa/ci-utils/cmd/hunspell_parser
go get -u github.com/ewgRa/ci-utils/cmd/github_comments_diff
go get -u github.com/ewgRa/ci-utils/cmd/github_comments_send
2018-05-06 00:29:15 +00:00
2020-11-12 22:42:41 +00:00
cd $DIR/go
go build -o /tmp/check_spell check_spell/main.go
go build -o /tmp/check_links check_links/main.go
cd $PWD_DIR