1
0
mirror of https://github.com/aquatix/dotfiles.git synced 2025-12-06 20:35:11 +01:00
Files
dotfiles/bin/ensure_virtualenv

19 lines
342 B
Bash
Executable File

#!/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"
setvirtualenvproject
fi
fi