diff --git a/lib/support/rewrite-hooks.sh b/lib/support/rewrite-hooks.sh new file mode 100755 index 00000000..6688785a --- /dev/null +++ b/lib/support/rewrite-hooks.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +src="/home/git/repositories" + +for dir in `ls "$src/"` +do + if [ -d "$src/$dir" ]; then + + if [ "$dir" = "gitolite-admin.git" ] + then + continue + fi + + project_hook="$src/$dir/hooks/post-receive" + gitolite_hook="/home/git/.gitolite/hooks/common/post-receive" + + ln -s -f $gitolite_hook $project_hook + fi +done