Commit 7daf0d2a authored by Jan Trmal's avatar Jan Trmal
Browse files

(trunk) Adding a script helping user installing mpg123 (for decoding of mp[23]files)

git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@4863 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
parent 36ae27bb
#!/bin/bash
# Copyright 2015 Johns Hopkins University (author: Jan Trmal)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
# WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
# MERCHANTABLITY OR NON-INFRINGEMENT.
# See the Apache 2 License for the specific language governing permissions and
# limitations under the License.
#
# This script attempts to install mpg123, which can be used for decoding
# mp2 and mp3 file formats.
errcho() { echo "$@" 1>&2; }
errcho "****() Installing MPG123"
if [ ! -e mpg123-1.21.0.tar.bz2 ]; then
errcho "Could not find the tarball mpg123-1.21.0.tar.bz2"
if ! which wget >&/dev/null; then
errcho "This script requires you to first install wget"
errcho "You can also just download mpg123-1.21.0.tar.bz2 from"
errcho "http://www.mpg123.org/download.shtml)"
errcho "and run this installation script again"
exit 1;
fi
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
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)"
errcho "and run this installation script again"
exit 1;
fi
fi
tar xjf mpg123-1.21.0.tar.bz2|| exit 1
rm -fr mpg123
ln -s mpg123-1.21.0 mpg123
(
cd mpg123
./configure --prefix `pwd` --with-default-audio=dummy --enable-static --disable-shared
make; make install
)
(
. ./env.sh
[ ! -z ${MPG123} ] && exit
wd=`pwd`
wd=`readlink -f $wd`
echo "export MPG123=$wd/mpg123"
echo "export PATH=\${PATH}:\${MPG123}/bin"
) >> env.sh
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