Skip to content

Instantly share code, notes, and snippets.

@pankaj28843
Created June 4, 2014 09:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pankaj28843/535bfe640a48ea4adc6d to your computer and use it in GitHub Desktop.
Save pankaj28843/535bfe640a48ea4adc6d to your computer and use it in GitHub Desktop.
run a command inside virtualenv
#!/bin/bash
VENV=$1
if [ -z $VENV ]; then
echo "usage: runinenv [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