Skip to content

Instantly share code, notes, and snippets.

@benjaminws
Created October 6, 2011 21:24
Show Gist options
  • Save benjaminws/1268723 to your computer and use it in GitHub Desktop.
Save benjaminws/1268723 to your computer and use it in GitHub Desktop.
Wrapper to run scripts that need a virtualenv
#!/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