Created
October 6, 2011 21:24
-
-
Save benjaminws/1268723 to your computer and use it in GitHub Desktop.
Wrapper to run scripts that need a virtualenv
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/bash | |
VENV=$1 | |
if [ -z $VENV ]; then | |
echo "usage: $0 [virtualenv_path] CMDS" | |
exit 1 | |
fi | |
. ${VENV}/bin/activate | |
shift 1 | |
echo "Executing $@ in ${VENV}" | |
exec "$@" | |
deactivate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment