Add subdir support for rewrite-hooks script
This commit is contained in:
parent
8392449599
commit
30d6370719
|
@ -11,9 +11,22 @@ do
|
|||
continue
|
||||
fi
|
||||
|
||||
project_hook="$src/$dir/hooks/post-receive"
|
||||
gitolite_hook="/home/git/.gitolite/hooks/common/post-receive"
|
||||
if [[ "$dir" =~ ^.*.git$ ]]
|
||||
then
|
||||
project_hook="$src/$dir/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
|
||||
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
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue