diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-11-22 12:24:46 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-11-22 12:24:46 +0200 |
commit | 65327cfc081030a3c7e4df978c2a346dd71895ab (patch) | |
tree | 83ca81b9021b4e3046102e094cb1856b807be154 /lib/support | |
parent | 6e3e3e7fd2a2dbbe736f43c1d201da68a57e9490 (diff) | |
download | gitlab-ce-65327cfc081030a3c7e4df978c2a346dd71895ab.tar.gz |
Rewrite hooks shell script
Diffstat (limited to 'lib/support')
-rwxr-xr-x | lib/support/rewrite-hooks.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/support/rewrite-hooks.sh b/lib/support/rewrite-hooks.sh new file mode 100755 index 00000000000..6688785a179 --- /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 |