Repository: climate Updated Branches: refs/heads/master 16380c165 -> 328cb6e19
CLIMATE-556 - Changes in easy_install scripts : creates new virtualenv by prompting the user for permission this closes #255 Project: http://git-wip-us.apache.org/repos/asf/climate/repo Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/1305896f Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/1305896f Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/1305896f Branch: refs/heads/master Commit: 1305896fa2cc38937e1f2af40752eaf57a32d8b9 Parents: ca93686 Author: Lewis John McGibbney <[email protected]> Authored: Thu Nov 12 10:47:59 2015 -0500 Committer: Lewis John McGibbney <[email protected]> Committed: Thu Nov 12 10:47:59 2015 -0500 ---------------------------------------------------------------------- easy-ocw/install-osx.sh | 20 ++++++++++++++++---- easy-ocw/install-ubuntu.sh | 19 ++++++++++++++++--- 2 files changed, 32 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/climate/blob/1305896f/easy-ocw/install-osx.sh ---------------------------------------------------------------------- diff --git a/easy-ocw/install-osx.sh b/easy-ocw/install-osx.sh index 507154a..9720d04 100755 --- a/easy-ocw/install-osx.sh +++ b/easy-ocw/install-osx.sh @@ -63,6 +63,7 @@ WITH_VIRTUAL_ENV=0 WITH_HOMEBREW=0 WITH_INTERACT=1 INIT_PWD=$PWD + while getopts ":h :e :q" FLAG do case $FLAG in @@ -94,16 +95,28 @@ ENDINTRO if [ $WITH_VIRTUAL_ENV != 1 ]; then cat << VIRTUALENV_WARNING +$(tput setaf 1)<-----------------------------[WARNING!]-----------------------------------> It is highly recommended that you allow Easy OCW to install the dependencies into a virtualenv environment to ensure that your global Python install is -not affected. If you're unsure, you should pass the -e flag +not affected. If you're UNSURE, you should pass the -e flag to this script. If you aren't concerned, or you want to create your own -virtualenv environment, then feel free to ignore this message. +virtualenv environment, then feel free to ignore this message.$(tput setaf 0) VIRTUALENV_WARNING fi -read -p "Press [ENTER] to begin installation ..." +read -p "Press [Yy] to begin installation with the flag -e $(tput setaf 2)[RECOMMENDED]$(tput setaf 0) +[OR] +Press [Nn] to continue with the normal installation..." yn +case $yn in + [Yy]* ) + WITH_VIRTUAL_ENV=1 + ;; + [Nn]* ) + WITH_VIRTUAL_ENV=0 + ;; + * ) echo "Please answer yes or no.." ;; +esac fi header "Checking for pip ..." @@ -179,7 +192,6 @@ echo | conda install --file ocw-conda-dependencies.txt header "Installing additional Python packages" pip install -r ocw-pip-dependencies.txt >> install_log - if [ $WITH_VIRTUAL_ENV == 1 ]; then echo "***POST INSTALLATION NOTE*** http://git-wip-us.apache.org/repos/asf/climate/blob/1305896f/easy-ocw/install-ubuntu.sh ---------------------------------------------------------------------- diff --git a/easy-ocw/install-ubuntu.sh b/easy-ocw/install-ubuntu.sh index 8018e87..f0f6ec5 100755 --- a/easy-ocw/install-ubuntu.sh +++ b/easy-ocw/install-ubuntu.sh @@ -96,16 +96,29 @@ ENDINTRO if [ $WITH_VIRTUAL_ENV != 1 ]; then cat << VIRTUALENV_WARNING +$(tput setaf 1)<-----------------------------[WARNING!]-----------------------------------> It is highly recommended that you allow Easy OCW to install the dependencies into a virtualenv environment to ensure that your global Python install is -not affected. If you're unsure, you should pass the -e flag +not affected. If you're UNSURE, you should pass the -e flag to this script. If you aren't concerned, or you want to create your own -virtualenv environment, then feel free to ignore this message. +virtualenv environment, then feel free to ignore this message.$(tput setaf 0) VIRTUALENV_WARNING fi -read -p "Press [ENTER] to begin installation ..." +read -p "Press [Yy] to begin installation with the flag -e $(tput setaf 2)[RECOMMENDED]$(tput setaf 0) +[OR] +Press [Nn] to continue with the normal installation..." yn +case $yn in + [Yy]* ) + WITH_VIRTUAL_ENV=1 + ;; + [Nn]* ) + WITH_VIRTUAL_ENV=0 + ;; + * ) echo "Please answer yes or no.." ;; +esac + echo -n "Please specify a full path to where your OCW download is then press [ENTER] ..." read ocw_path fi
