1#!/bin/bash 2 3for i in `find $(dirname "$0") -type f | grep -v 'install_hooks.sh'`; do 4 dest=`git rev-parse --git-dir`/hooks 5 echo "linking $i to $dest" 6 chmod +x $i 7 ln -s `pwd`/$i $dest/$(basename $i) 8done 9