Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (21 sloc) 446 Bytes
use_techbot_env() {
typeset venv
venv="techbot"
if [[ "${VIRTUAL_ENV:t}" != "knewton" ]]; then
if [[ "${VIRTUAL_ENV:t}" != "$venv" ]]; then
if workon | grep -q "$venv"; then
workon "$venv"
else
echo -n "Create virtualenv $venv now? (Yn) "
read answer
if [[ "$answer" == "Y" ]]; then
if [ -e "mgmt/virtualenv.sh" ]; then
mgmt/virtualenv.sh
fi
workon "$venv"
fi
fi
fi
fi
}
use_techbot_env