#!/usr/bin/env python

#Activate the virtual environment if there's one for this project
from settings import UNDER_VIRTUALENV, VIRTUALENV
if UNDER_VIRTUALENV is True:
    activate_this = '/usr/local/share/python-environments/{}/bin/activate_this.py'.format(
        VIRTUALENV)
    execfile(activate_this, dict(__file__=activate_this))

import os
from settings import POST_COMMIT as scripts
hooks = __import__('post_commit_scripts', globals(), locals(), scripts, 0)

git_dir = os.environ['GIT_DIR']
hooks_dir = os.path.join(git_dir, 'hooks/post_commit_hooks')
