Skip to content

Instantly share code, notes, and snippets.

@ojii
Created April 8, 2011 08:01
Show Gist options
  • Save ojii/909463 to your computer and use it in GitHub Desktop.
Save ojii/909463 to your computer and use it in GitHub Desktop.
Run a single command in a virtualenv (using virtualenvwrapper)
function justonce(){
E_BADARGS=65
if [ $# -lt 2 ]
then
echo "Usage: `justonce <envname> <command>`"
exit $E_BADARGS
fi
workon $1
shift
$*
deactivate
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment