Commit 65327cfc081030a3c7e4df978c2a346dd71895ab

Authored by Dmitriy Zaporozhets
1 parent 6e3e3e7f

Rewrite hooks shell script

Showing 1 changed file with 19 additions and 0 deletions   Show diff stats
lib/support/rewrite-hooks.sh 0 → 100755
... ... @@ -0,0 +1,19 @@
  1 +#!/bin/bash
  2 +
  3 +src="/home/git/repositories"
  4 +
  5 +for dir in `ls "$src/"`
  6 +do
  7 + if [ -d "$src/$dir" ]; then
  8 +
  9 + if [ "$dir" = "gitolite-admin.git" ]
  10 + then
  11 + continue
  12 + fi
  13 +
  14 + project_hook="$src/$dir/hooks/post-receive"
  15 + gitolite_hook="/home/git/.gitolite/hooks/common/post-receive"
  16 +
  17 + ln -s -f $gitolite_hook $project_hook
  18 + fi
  19 +done
... ...