setup.sh 735 字节
Newer Older
Y
yangyaming 已提交
1 2 3
#!/bin/bash

# install python dependencies
4
if [ -f "requirements.txt" ]; then
Y
yangyaming 已提交
5 6 7
    pip install -r requirements.txt
fi
if [ $? != 0 ]; then
Y
yangyaming 已提交
8
    echo "Install python dependencies failed !!!"
Y
yangyaming 已提交
9 10 11
    exit 1
fi

12 13 14
# install package libsndfile
DIR="$( cd "$(dirname "$0")" ; pwd -P )"
mkdir thirdparty
15
curl -O "http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.28.tar.gz"
Y
yangyaming 已提交
16
if [ $? != 0 ]; then
17
    echo "Download libsndfile-1.0.28.tar.gz failed !!!"
Y
yangyaming 已提交
18 19
    exit 1
fi
20 21
tar -zxvf libsndfile-1.0.28.tar.gz
cd libsndfile-1.0.28
22 23
./configure --prefix=$DIR/thirdparty/libsndfile && make && make install
cd ..
24 25
rm -rf libsndfile-1.0.28
rm libsndfile-1.0.28.tar.gz
Y
yangyaming 已提交
26

27 28 29
# prepare ./checkpoints
mkdir checkpoints

Y
yangyaming 已提交
30
echo "Install all dependencies successfully."