You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
660 B
25 lines
660 B
4 years ago
|
#!/bin/bash
|
||
|
|
||
4 years ago
|
set -e
|
||
|
set -x
|
||
|
|
||
4 years ago
|
|
||
4 years ago
|
# need support c++17, so need gcc >= 8
|
||
|
# openfst
|
||
|
ngram=ngram-1.3.13
|
||
4 years ago
|
openfst=openfst-1.8.1
|
||
4 years ago
|
shared=true
|
||
|
|
||
4 years ago
|
export CPLUS_INCLUDE_PATH=$PWD/${openfst}/install/include/:$CPLUS_INCLUDE_PATH
|
||
|
export LD_LIBRARY_PATH=$PWD/${openfst}/install/lib/:$LD_LIBRARY_PATH
|
||
|
|
||
4 years ago
|
test -e ${ngram}.tar.gz || wget http://www.openfst.org/twiki/pub/GRM/NGramDownload/${ngram}.tar.gz
|
||
|
test -d ${ngram} || tar -xvf ${ngram}.tar.gz && chown -R root:root ${ngram}
|
||
|
|
||
|
if [ $shared == true ];then
|
||
|
pushd ${ngram} && ./configure --enable-shared && popd
|
||
|
else
|
||
|
pushd ${ngram} && ./configure --enable-static && popd
|
||
|
fi
|
||
|
pushd ${ngram} && make -j && make install && popd
|