From 7d02580a2bb359ea1c793c658dbbe857cf0a5a0b Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 7 Aug 2019 21:03:03 +0200 Subject: [PATCH] setup.sh script shall fail if venv initialization fails --- setup.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/setup.sh b/setup.sh index fe7110ef6..908e77767 100755 --- a/setup.sh +++ b/setup.sh @@ -39,15 +39,13 @@ function updateenv() { echo "-------------------------" source .env/bin/activate echo "pip install in-progress. Please wait..." - # Install numpy first to have py_find_1st install clean - ${PYTHON} -m pip install --upgrade pip numpy - ${PYTHON} -m pip install --upgrade -r requirements.txt - + ${PYTHON} -m pip install --upgrade pip read -p "Do you want to install dependencies for dev [y/N]? " if [[ $REPLY =~ ^[Yy]$ ]] then ${PYTHON} -m pip install --upgrade -r requirements-dev.txt else + ${PYTHON} -m pip install --upgrade -r requirements.txt echo "Dev dependencies ignored." fi @@ -90,7 +88,7 @@ function install_macos() { # Install bot Debian_ubuntu function install_debian() { sudo apt-get update - sudo apt-get install build-essential autoconf libtool pkg-config make wget git + sudo apt-get install -y build-essential autoconf libtool pkg-config make wget git install_talib } @@ -129,6 +127,10 @@ function reset() { echo ${PYTHON} -m venv .env + if [ $? -ne 0 ]; then + echo "Could not create virtual environment. Leaving now" + exit 1 + fi updateenv }