summaryrefslogtreecommitdiffstats
path: root/bashrc
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bashrc/common/virtualenv.sh15
1 files changed, 11 insertions, 4 deletions
diff --git a/bashrc/common/virtualenv.sh b/bashrc/common/virtualenv.sh
index 7ba48b9..c3e0ea9 100644
--- a/bashrc/common/virtualenv.sh
+++ b/bashrc/common/virtualenv.sh
@@ -1,6 +1,13 @@
-if hash "virtualenvwrapper.sh" 2>/dev/null; then
- source $(which virtualenvwrapper.sh)
+export WORKON_HOME="$HOME/.virtualenvs/"
+if [ ! -d "${WORKON_HOME}" ]; then
+ mkdir -p "${WORKON_HOME}"
fi
-# build absolut path (needed for prompt)
-export WORKON_HOME="$(cd "${WORKON_HOME}" 2>&1 >/dev/null; pwd -P)"
+if [ -d "${WORKON_HOME}" ]; then
+ if hash "virtualenvwrapper.sh" 2>/dev/null; then
+ source $(which virtualenvwrapper.sh)
+ fi
+
+ # build absolut path (needed for prompt)
+ export WORKON_HOME="$(cd "${WORKON_HOME}" 2>&1 >/dev/null; pwd -P)"
+fi