2018-01-02 15:28:17 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-02-12 21:50:49 +00:00
|
|
|
set -xe
|
2018-01-02 15:28:17 +00:00
|
|
|
|
2020-11-12 22:42:25 +00:00
|
|
|
PWD_DIR=`pwd`
|
2018-05-06 00:27:28 +00:00
|
|
|
DIR=`dirname $0`
|
|
|
|
|
2020-11-12 22:42:25 +00:00
|
|
|
apt-get -yqq update && apt-get install -y curl wget unzip binutils hunspell hunspell-ru hunspell-en-us hunspell-de-de jq
|
2023-08-22 12:08:24 +00:00
|
|
|
wget https://extensions.libreoffice.org/assets/downloads/48/dict_ru_ru-aot-0.4.5.oxt -O /tmp/dictionary.otx
|
2018-01-02 15:28:17 +00:00
|
|
|
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 14:35:21 +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
|
|
|
|
|
2023-08-22 12:08:24 +00:00
|
|
|
go install github.com/ewgRa/ci-utils/cmd/diff_liner@latest
|
|
|
|
go install github.com/ewgRa/ci-utils/cmd/hunspell_parser@latest
|
|
|
|
go install github.com/ewgRa/ci-utils/cmd/github_comments_diff@latest
|
|
|
|
go install github.com/ewgRa/ci-utils/cmd/github_comments_send@latest
|
2018-05-06 00:27:28 +00:00
|
|
|
|
2020-11-12 22:42:25 +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
|
2023-08-22 12:08:24 +00:00
|
|
|
cd $PWD_DIR
|