-
-
Save hodgestar/0d2565548dcd2521d03f4a081bc8a773 to your computer and use it in GitHub Desktop.
Simple helper that creates virtualenvs named after the current working directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
function lve () { | |
if [ -n "$1" ] | |
then | |
VENV="$1" | |
else | |
VENV=`basename "$PWD"` | |
fi | |
VENV_PATH="/home/$USER/venvs/$VENV" | |
if [ ! -e "$VENV_PATH" ] | |
then | |
virtualenv "$VENV_PATH" | |
fi | |
unset VENV | |
source "$VENV_PATH/bin/activate" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment