Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rewrite hooks shell script

  • Loading branch information...
commit 65327cfc081030a3c7e4df978c2a346dd71895ab 1 parent 6e3e3e7
Dmitriy Zaporozhets randx authored
Showing with 19 additions and 0 deletions.
  1. +19 −0 lib/support/rewrite-hooks.sh
19 lib/support/rewrite-hooks.sh
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.