Commit ca3c81bf authored by Jan Trmal's avatar Jan Trmal

Improving the self-configuration capability of some of the extra tools

parent 1f9bc6f7
......@@ -58,6 +58,12 @@
/tools/CLAPACK_include
/tools/kaldi_lm
/tools/env.sh
/tools/g2p-r1668.tar.gz
/tools/mpg123
/tools/mpg123-1.21.0.tar.bz2
/tools/mpg123-1.21.0
/tools/sequitur
/tools/srilm.tgz
# /src/
/src/doc/table/
......
......@@ -46,8 +46,13 @@ fi
}
(
. ./env.sh
[ ! -z ${IRSTLM} ] && exit
[ ! -z ${IRSTLM} ] && \
echo >&2 "IRSTLM variable is aleady defined. Undefining..." && \
unset IRSTLM
[ -f ./env.sh ] && . ./env.sh
[ ! -z ${IRSTLM} ] && \
echo >&2 "IRSTLM config is already in env.sh" && exit
wd=`pwd`
wd=`readlink -f $wd`
......@@ -57,3 +62,4 @@ fi
) >> env.sh
errcho "***() Installation of IRSTLM finished successfully"
errcho "***() Please source the tools/env.sh in your path.sh to enable it"
......@@ -34,7 +34,7 @@ if [ ! -e mpg123-1.21.0.tar.bz2 ]; then
wget -T 10 -t 3 -c 'http://downloads.sourceforge.net/project/mpg123/mpg123/1.21.0/mpg123-1.21.0.tar.bz2'
if [ ! -e mpg123-1.21.0.tar.bz2]; then
if [ ! -e mpg123-1.21.0.tar.bz2 ]; then
errcho "Download of mpg123-1.21.0.tar.bz2 failed!"
errcho "You can also just download mpg123-1.21.0.tar.bz2 from"
errcho "http://www.mpg123.org/download.shtml)"
......@@ -54,13 +54,23 @@ ln -s mpg123-1.21.0 mpg123
)
(
. ./env.sh
[ ! -z ${MPG123} ] && exit
set +u
[ ! -z ${MPG123} ] && \
echo >&2 "MPG123 variable is aleady defined. Undefining..." && \
unset MPG123
wd=`pwd`
wd=`readlink -f $wd`
[ -f ./env.sh ] && . ./env.sh
echo "export MPG123=$wd/mpg123"
echo "export PATH=\${PATH}:\${MPG123}/bin"
[ ! -z ${MPG123} ] && \
echo >&2 "MPG123 config is already in env.sh" && exit
wd=`pwd`
wd=`readlink -f $wd`
echo "export MPG123=$wd/mpg123"
echo "export PATH=\${PATH}:\${MPG123}/bin"
) >> env.sh
echo >&2 "Installation of MPG123 finished successfully"
echo >&2 "Please source the tools/env.sh in your path.sh to enable it"
......@@ -51,9 +51,25 @@ python setup.py install --prefix `pwd`
cd ../
(
set -x
echo "export G2P=`pwd`/sequitur"
echo "export PATH=\$PATH:\${G2P}/bin"
echo "_site_packages=\`readlink -f \${G2P}/lib/python*/site-packages\`"
echo "export PYTHONPATH=\$PYTHONPATH:\$_site_packages"
set +u
[ ! -z ${SEQUITUR} ] && \
echo >&2 "SEQUITUR variable is aleady defined. Undefining..." && \
unset SEQUITUR
[ -f ./env.sh ] && . ./env.sh
[ ! -z ${SEQUITUR} ] && \
echo >&2 "SEQUITUR config is already in env.sh" && exit
wd=`pwd`
wd=`readlink -f $wd`
echo "export SEQUITUR=$wd/sequitur"
echo "export PATH=\$PATH:\${SEQUITUR}/bin"
echo "_site_packages=\`readlink -f \${SEQUITUR}/lib/python*/site-packages\`"
echo "export PYTHONPATH=\$PYTHONPATH:\$_site_packages"
) >> env.sh
echo >&2 "Installation of SEQUITUR finished successfully"
echo >&2 "Please source the tools/env.sh in your path.sh to enable it"
......@@ -24,3 +24,28 @@ cat tmpf | awk -v pwd=`pwd` '/SRILM =/{printf("SRILM = %s\n", pwd); next;} {prin
make
cd ..
(
[ ! -z ${SRILM} ] && \
echo >&2 "SRILM variable is aleady defined. Undefining..." && \
unset SRILM
[ -f ./env.sh ] && . ./env.sh
[ ! -z ${SRILM} ] && \
echo >&2 "SRILM config is already in env.sh" && exit
wd=`pwd`
wd=`readlink -f $wd`
echo "export SRILM=$wd/srilm"
dirs="\${PATH}"
for directory in $(cd srilm && find bin -type d ) ; do
dirs="$dirs:\${SRILM}/$directory"
done
echo "export PATH=$dirs"
) >> env.sh
echo >&2 "Installation of SRILM finished successfully"
echo >&2 "Please source the tools/env.sh in your path.sh to enable it"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment