setup.sh 759 字节
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
# install package libsndfile
L
Luo Tao 已提交
13
python -c "import soundfile"
Y
yangyaming 已提交
14
if [ $? != 0 ]; then
L
Luo Tao 已提交
15 16 17 18 19 20 21 22 23 24 25 26
    echo "Install package libsndfile into default system path."
    curl -O "http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.28.tar.gz"
    if [ $? != 0 ]; then
        echo "Download libsndfile-1.0.28.tar.gz failed !!!"
        exit 1
    fi
    tar -zxvf libsndfile-1.0.28.tar.gz
    cd libsndfile-1.0.28
    ./configure && make && make install
    cd ..
    rm -rf libsndfile-1.0.28
    rm libsndfile-1.0.28.tar.gz
Y
yangyaming 已提交
27
fi
Y
yangyaming 已提交
28 29

echo "Install all dependencies successfully."