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