Skip to content

Commit

Permalink
apertium parser install script
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Beloborodov committed Oct 5, 2021
1 parent a74bf75 commit 21286ae
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
22 changes: 22 additions & 0 deletions aux_scripts/apertium_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
if [ $# -eq 0 ]; then
echo -e "Needs one parameter: the path to the directory where apertium packages should be installed ";
exit 1;
fi;
if ! [ -d "$1" ]; then
echo -e "Passed parameter is not a valid path. ";
exit 1;
fi;
locale-gen en_US.UTF-8 && update-locale;
apt install -y lttoolbox apertium-dev \
apertium-lex-tools hfst libhfst-dev cg3 cg3-dev autoconf;
if ! [ -d "$1/apertium-kaz" ]; then git clone https://github.com/apertium/apertium-kaz $1/apertium-kaz; fi;
cd $1/apertium-kaz && ./autogen.sh && ./configure && make && make install;
if ! [ -d "$1/apertium-tat" ]; then git clone https://github.com/apertium/apertium-tat $1/apertium-tat; fi;
cd $1/apertium-tat && ./autogen.sh && ./configure && make && make install;
if ! [ -d "$1/apertium-rus" ]; then git clone https://github.com/apertium/apertium-rus $1/apertium-rus; fi;
cd $1/apertium-rus && ./autogen.sh && ./configure && make && make install;
if ! [ -d "$1/apertium-kaz-rus" ]; then git clone https://github.com/apertium/apertium-kaz-rus $1/apertium-kaz-rus; fi;
cd $1/apertium-kaz-rus && ./autogen.sh && ./configure && make && make install;
if ! [ -d "$1/apertium-tat-rus" ]; then git clone https://github.com/apertium/apertium-tat-rus $1/apertium-tat-rus; fi;
cd $1/apertium-tat-rus && ./autogen.sh && ./configure && make && make install;
3 changes: 2 additions & 1 deletion development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ pyramid.includes =

sqlalchemy.url = postgresql+psycopg2://postgres@/lingvodoc

# This parameter should be specified manually
# This parameters should be specified manually
dedoc_url = http://dedoc-demo.at.ispras.ru/upload
apertium_path = /opt/apertium

# By default, the toolbar only appears for clients from IP addresses
# '127.0.0.1' and '::1'.
Expand Down
3 changes: 2 additions & 1 deletion docker/docker.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ sqlalchemy.url = postgresql+psycopg2://postgres:password@pg:5432/lingvodoc

# These parameters should be specified manually
dedoc_url = dedoc_url
apertium_path = /absolute/path
apertium_path = apertium_path

# By default, the toolbar only appears for clients from IP addresses
# '127.0.0.1' and '::1'.
# debugtoolbar.hosts = 127.0.0.1 ::1
Expand Down

0 comments on commit 21286ae

Please sign in to comment.