Commit 6f798f3d authored by Michael's avatar Michael

Correcting regex match

Stops paths such as test_git, testgit etc.. being matched
parent 12b952b6
...@@ -11,7 +11,7 @@ do ...@@ -11,7 +11,7 @@ do
continue continue
fi 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/git/gitlab-shell/hooks/post-receive" gitolite_hook="/home/git/gitlab-shell/hooks/post-receive"
...@@ -23,7 +23,7 @@ do ...@@ -23,7 +23,7 @@ do
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/git/gitlab-shell/hooks/post-receive" gitolite_hook="/home/git/gitlab-shell/hooks/post-receive"
ln -s -f $gitolite_hook $project_hook ln -s -f $gitolite_hook $project_hook
......
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