Skip to content

Instantly share code, notes, and snippets.

@nhanb
Created September 22, 2014 15:03
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 nhanb/6eddf652f616f0b3123b to your computer and use it in GitHub Desktop.
Save nhanb/6eddf652f616f0b3123b to your computer and use it in GitHub Desktop.
postmkvirtualenv
#!/usr/bin/env bash
# This hook is sourced after a new virtualenv is activated.
# Automatically create symlink to project-specific virtualenv hook
hook="`pwd`/.virtualenv/postactivate"
if [[ -e "$hook" ]]; then
rm -f $VIRTUAL_ENV/bin/postactivate
ln -s $hook $VIRTUAL_ENV/bin/postactivate
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment