1
0
mirror of https://github.com/aquatix/dotfiles.git synced 2025-12-07 00:05:10 +01:00

Ensure that a virtualenv with that name exists

This commit is contained in:
2015-07-20 22:23:28 +02:00
parent a0f4a3d638
commit fa29a3510d

17
bin/ensure_virtualenv Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
if [ -z "$1" ]; then
echo "Provide a virtualenv name"
else
VENVDIR="$HOME/.virtualenvs/$1"
#source `which virtualenvwrapper.sh`
source /usr/share/virtualenvwrapper/virtualenvwrapper.sh
if [ -d "$VENVDIR" ]; then
workon "$1"
else
mkvirtualenv "$1"
fi
fi