#372 - dev_setup.sh ignores WORKON_HOME when VIRTUALENV_ROOT is unset (#376)

#372 - dev_setup.sh ignores WORKON_HOME when VIRTUALENV_ROOT is unset
- Favor using the WORKON_HOME environment variable over VIRTUALENV_ROOT
- Specifying the name of the virtualenv directory
- Postfixing VIRTUALENV_ROOT with "/mycroft"
pull/446/merge
Nicolas Couture 2017-01-28 05:41:29 +00:00 committed by Augusto Monteiro
parent 04359f000f
commit 878b05298d
1 changed files with 6 additions and 1 deletions

View File

@ -33,7 +33,12 @@ if [ $(id -u) -eq 0 ]; then
fi fi
TOP=$(cd $(dirname $0) && pwd -L) TOP=$(cd $(dirname $0) && pwd -L)
if [ -z "$WORKON_HOME" ]; then
VIRTUALENV_ROOT=${VIRTUALENV_ROOT:-"${HOME}/.virtualenvs/mycroft"} VIRTUALENV_ROOT=${VIRTUALENV_ROOT:-"${HOME}/.virtualenvs/mycroft"}
else
VIRTUALENV_ROOT="$WORKON_HOME/mycroft"
fi
# create virtualenv, consistent with virtualenv-wrapper conventions # create virtualenv, consistent with virtualenv-wrapper conventions
if [ ! -d ${VIRTUALENV_ROOT} ]; then if [ ! -d ${VIRTUALENV_ROOT} ]; then