exit 1
}
}
+
+
+install_git_hooks ()
+{
+ if test -d .git; then
+ # install pre-commit hook for doing clean commits
+ for hook in pre-commit; do
+ if test ! \( -x .git/hooks/$hook -a -L .git/hooks/$hook \); then
+ echo "+ Installing git $hook hook"
+ rm -f .git/hooks/$hook
+ ln -s ../../common/hooks/$hook.hook .git/hooks/$hook || {
+ # if we couldn't create a symbolic link, try doing a plain cp
+ if cp common/hooks/pre-commit.hook .git/hooks/pre-commit; then
+ chmod +x .git/hooks/pre-commit;
+ else
+ echo "********** Couldn't install git $hook hook **********";
+ fi
+ }
+ fi
+ done
+ fi
+}
+
+