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:
17
bin/ensure_virtualenv
Executable file
17
bin/ensure_virtualenv
Executable 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
|
||||
Reference in New Issue
Block a user