#!/usr/bin/env sh if [ -d .git/hooks ]; then mv .git/hooks .git/hooks_backup fi mkdir -p .git/hooks cd .git/hooks || exit # note, we cd into .git/hooks because git will evaluate symlinks from that position ln -s ../../hooks/* .