Commit 30d63707 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Add subdir support for rewrite-hooks script

parent 83924495
...@@ -11,9 +11,22 @@ do ...@@ -11,9 +11,22 @@ do
continue continue
fi fi
project_hook="$src/$dir/hooks/post-receive" if [[ "$dir" =~ ^.*.git$ ]]
gitolite_hook="/home/git/.gitolite/hooks/common/post-receive" then
project_hook="$src/$dir/hooks/post-receive"
gitolite_hook="/home/git/.gitolite/hooks/common/post-receive"
ln -s -f $gitolite_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/git/.gitolite/hooks/common/post-receive"
ln -s -f $gitolite_hook $project_hook ln -s -f $gitolite_hook $project_hook
fi
done
fi
fi fi
done done
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