Setup.sh: fix Python3.6 when broken on macOS

This commit is contained in:
Gerald Lonlas 2018-05-29 20:49:37 -07:00
parent 5a4eb2cbf2
commit f59f534c64

View File

@ -33,6 +33,8 @@ function install_macos () {
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi fi
brew install python3 wget ta-lib brew install python3 wget ta-lib
test_and_fix_python_on_mac
} }
# Install bot Debian_ubuntu # Install bot Debian_ubuntu
@ -81,6 +83,19 @@ function reset () {
updateenv updateenv
} }
function test_and_fix_python_on_mac() {
if ! [ -x "$(command -v python3.6)" ]
then
echo "-------------------------"
echo "Fixing Python"
echo "-------------------------"
echo "Python 3.6 is not linked in your system. Fixing it..."
brew link --overwrite python
echo
fi
}
function config_generator () { function config_generator () {
echo "Starting to generate config.json" echo "Starting to generate config.json"