From d1e2a53267bdd0a6b2d1a2d7bae72734ed80ce01 Mon Sep 17 00:00:00 2001 From: Sam Germain Date: Sun, 24 Oct 2021 23:33:02 -0600 Subject: [PATCH] Added centOS support to setup.sh script --- setup.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/setup.sh b/setup.sh index 3af358468..1d76c6d2a 100755 --- a/setup.sh +++ b/setup.sh @@ -144,7 +144,14 @@ function install_macos() { # Install bot Debian_ubuntu function install_debian() { sudo apt-get update - sudo apt-get install -y build-essential autoconf libtool pkg-config make wget git $(echo lib${PYTHON}-dev ${PYTHON}-venv) + sudo apt-get install -y gcc build-essential autoconf libtool pkg-config make wget git $(echo lib${PYTHON}-dev ${PYTHON}-venv) + install_talib +} + +# Install bot RedHat_CentOS +function install_redhat() { + sudo yum update + sudo yum install -y gcc gcc-c++ build-essential autoconf libtool pkg-config make wget git $(echo ${PYTHON}-devel | sed 's/\.//g') install_talib } @@ -201,17 +208,18 @@ function install() { echo_block "Installing mandatory dependencies" - if [ "$(uname -s)" == "Darwin" ] - then + if [ "$(uname -s)" == "Darwin" ]; then echo "macOS detected. Setup for this system in-progress" install_macos - elif [ -x "$(command -v apt-get)" ] - then + elif [ -x "$(command -v apt-get)" ]; then echo "Debian/Ubuntu detected. Setup for this system in-progress" install_debian + elif [ -x "$(command -v yum)" ]; then + echo "Red Hat/CentOS detected. Setup for this system in-progress" + install_redhat else echo "This script does not support your OS." - echo "If you have Python3.6 or Python3.7, pip, virtualenv, ta-lib you can continue." + echo "If you have Python version 3.6 - 3.9, pip, virtualenv, ta-lib you can continue." echo "Wait 10 seconds to continue the next install steps or use ctrl+c to interrupt this shell." sleep 10 fi