Commit 57f73737 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Remove gitolite support from rewrite-hooks.sh

parent f13afa2d
...@@ -9,32 +9,26 @@ src=${1:-"$home_dir/repositories"} ...@@ -9,32 +9,26 @@ src=${1:-"$home_dir/repositories"}
for dir in `ls "$src/"` for dir in `ls "$src/"`
do do
if [ -d "$src/$dir" ]; then if [ -d "$src/$dir" ]; then
if [ "$dir" = "gitolite-admin.git" ]
then
continue
fi
if [[ "$dir" =~ ^.*\.git$ ]] if [[ "$dir" =~ ^.*\.git$ ]]
then then
project_hook="$src/$dir/hooks/post-receive" project_hook="$src/$dir/hooks/post-receive"
gitolite_hook="$home_dir/gitlab-shell/hooks/post-receive" gitlab_shell_hook="$home_dir/gitlab-shell/hooks/post-receive"
ln -s -f $gitolite_hook $project_hook ln -s -f $gitlab_shell_hook $project_hook
project_hook="$src/$dir/hooks/update" project_hook="$src/$dir/hooks/update"
gitolite_hook="$home_dir/gitlab-shell/hooks/update" gitlab_shell_hook="$home_dir/gitlab-shell/hooks/update"
ln -s -f $gitolite_hook $project_hook ln -s -f $gitlab_shell_hook $project_hook
else else
for subdir in `ls "$src/$dir/"` for subdir in `ls "$src/$dir/"`
do do
if [ -d "$src/$dir/$subdir" ] && [[ "$subdir" =~ ^.*\.git$ ]]; then if [ -d "$src/$dir/$subdir" ] && [[ "$subdir" =~ ^.*\.git$ ]]; then
project_hook="$src/$dir/$subdir/hooks/post-receive" project_hook="$src/$dir/$subdir/hooks/post-receive"
gitolite_hook="$home_dir/gitlab-shell/hooks/post-receive" gitlab_shell_hook="$home_dir/gitlab-shell/hooks/post-receive"
ln -s -f $gitolite_hook $project_hook ln -s -f $gitlab_shell_hook $project_hook
project_hook="$src/$dir/$subdir/hooks/update" project_hook="$src/$dir/$subdir/hooks/update"
gitolite_hook="$home_dir/gitlab-shell/hooks/update" gitlab_shell_hook="$home_dir/gitlab-shell/hooks/update"
ln -s -f $gitolite_hook $project_hook ln -s -f $gitlab_shell_hook $project_hook
fi fi
done done
fi fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment