forked from kaldi-asr/kaldi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
65 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2015, Johns Hopkins University (Yenda Trmal <[email protected]>) | ||
# License: Apache 2.0 | ||
|
||
# Begin configuration section. | ||
# End configuration section | ||
set -e -o pipefail | ||
|
||
errcho() { echo "$@" 1>&2; } | ||
|
||
errcho "****() Installing IRSTLM" | ||
|
||
if [ ! -x ./irstlm ] ; then | ||
svn=`which svn` | ||
if [ $? != 0 ] ; then | ||
errcho "****() You need to have svn (subversion) installed" | ||
exit 1 | ||
fi | ||
( | ||
svn -r 618 co --non-interactive --trust-server-cert \ | ||
https://svn.code.sf.net/p/irstlm/code/trunk irstlm | ||
) || { | ||
errcho "****() Error getting the IRSTLM sources. The server hosting it" | ||
errcho "****() might be down." | ||
exit 1 | ||
} | ||
else | ||
echo "****() Assuming IRSTLM is already installed. Please delete" | ||
echo "****() the directory ./irstlm if you need us to download" | ||
echo "****() the sources again." | ||
fi | ||
|
||
( | ||
cd irstlm || exit 1 | ||
automake --version | grep 1.13.1 >/dev/null && \ | ||
sed s:AM_CONFIG_HEADER:AC_CONFIG_HEADERS: <configure.in >configure.ac; | ||
|
||
./regenerate-makefiles.sh || ./regenerate-makefiles.sh | ||
|
||
./configure --prefix `pwd` | ||
|
||
make; make install | ||
) || { | ||
errcho "***() Error compiling IRSTLM. The error messages could help you " | ||
errcho "***() in figuring what went wrong." | ||
} | ||
|
||
( | ||
. ./env.sh | ||
[ ! -z ${IRSTLM} ] && exit | ||
|
||
wd=`pwd` | ||
wd=`readlink -f $wd` | ||
|
||
echo "export IRSTLM=$wd/irstlm" | ||
echo "export PATH=\${PATH}:\${IRSTLM}/bin" | ||
) >> env.sh | ||
|
||
errcho "***() Installation of IRSTLM finished successfully" |