Skip to content

Instantly share code, notes, and snippets.

@hexylena
Created July 1, 2016 11:54
Show Gist options
  • Save hexylena/f9866ce46b6997ab6966ff129701358f to your computer and use it in GitHub Desktop.
Save hexylena/f9866ce46b6997ab6966ff129701358f to your computer and use it in GitHub Desktop.
#!/bin/bash
VIRTUAL_ENV=$1
if [ -z $VIRTUAL_ENV ]; then
echo "usage: $0 </path/to/virtualenv> <cmd>"
exit 1
fi
. $VIRTUAL_ENV/bin/activate
shift 1
exec "$@"
deactivate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment