summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsupport/rewrite-hooks.sh22
1 files changed, 8 insertions, 14 deletions
diff --git a/support/rewrite-hooks.sh b/support/rewrite-hooks.sh
index 1d0542e..3c4efa4 100755
--- a/support/rewrite-hooks.sh
+++ b/support/rewrite-hooks.sh
@@ -9,32 +9,26 @@ src=${1:-"$home_dir/repositories"}
for dir in `ls "$src/"`
do
if [ -d "$src/$dir" ]; then
-
- if [ "$dir" = "gitolite-admin.git" ]
- then
- continue
- fi
-
if [[ "$dir" =~ ^.*\.git$ ]]
then
project_hook="$src/$dir/hooks/post-receive"
- gitolite_hook="$home_dir/gitlab-shell/hooks/post-receive"
- ln -s -f $gitolite_hook $project_hook
+ gitlab_shell_hook="$home_dir/gitlab-shell/hooks/post-receive"
+ ln -s -f $gitlab_shell_hook $project_hook
project_hook="$src/$dir/hooks/update"
- gitolite_hook="$home_dir/gitlab-shell/hooks/update"
- ln -s -f $gitolite_hook $project_hook
+ gitlab_shell_hook="$home_dir/gitlab-shell/hooks/update"
+ ln -s -f $gitlab_shell_hook $project_hook
else
for subdir in `ls "$src/$dir/"`
do
if [ -d "$src/$dir/$subdir" ] && [[ "$subdir" =~ ^.*\.git$ ]]; then
project_hook="$src/$dir/$subdir/hooks/post-receive"
- gitolite_hook="$home_dir/gitlab-shell/hooks/post-receive"
- ln -s -f $gitolite_hook $project_hook
+ gitlab_shell_hook="$home_dir/gitlab-shell/hooks/post-receive"
+ ln -s -f $gitlab_shell_hook $project_hook
project_hook="$src/$dir/$subdir/hooks/update"
- gitolite_hook="$home_dir/gitlab-shell/hooks/update"
- ln -s -f $gitolite_hook $project_hook
+ gitlab_shell_hook="$home_dir/gitlab-shell/hooks/update"
+ ln -s -f $gitlab_shell_hook $project_hook
fi
done
fi