#!/bin/bash basepath=$(cd `dirname $0`; pwd) githooks_dir=${basepath}/../../../../.git/hooks if [ ! -L $githooks_dir/applypatch-msg ]; then ln -s $basepath/applypatch-msg $githooks_dir/applypatch-msg fi if [ ! -L $githooks_dir/commit-msg ]; then ln -s $basepath/commit-msg $githooks_dir/commit-msg fi if [ ! -L $githooks_dir/post-update ]; then ln -s $basepath/post-update $githooks_dir/post-update fi if [ ! -L $githooks_dir/pre-applypatch ]; then ln -s $basepath/pre-applypatch $githooks_dir/pre-applypatch fi if [ ! -L $githooks_dir/pre-commit ]; then ln -s $basepath/pre-commit $githooks_dir/pre-commit fi if [ ! -L $githooks_dir/prepare-commit-msg ]; then ln -s $basepath/prepare-commit-msg $githooks_dir/prepare-commit-msg fi if [ ! -L $githooks_dir/pre-push ]; then ln -s $basepath/pre-push $githooks_dir/pre-push fi if [ ! -L $githooks_dir/pre-rebase ]; then ln -s $basepath/pre-rebase $githooks_dir/pre-rebase fi if [ ! -L $githooks_dir/update ]; then ln -s $basepath/update $githooks_dir/update fi