summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael <michael@fallo.ws>2013-02-07 11:26:33 +0000
committerMichael <michael@fallo.ws>2013-02-07 11:26:33 +0000
commit6f798f3d3f56281facd3402ce16f13954f2462bb (patch)
tree63ae05d71832c0f9a2c6180278c094029d0a56c9
parent12b952b6513ad7dec69c6f2b19fb27e352c89ec6 (diff)
downloadgitlab-shell-6f798f3d3f56281facd3402ce16f13954f2462bb.tar.gz
Correcting regex match
Stops paths such as test_git, testgit etc.. being matched
-rwxr-xr-xsupport/rewrite-hooks.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/support/rewrite-hooks.sh b/support/rewrite-hooks.sh
index 4f8ec05..b328f3e 100755
--- a/support/rewrite-hooks.sh
+++ b/support/rewrite-hooks.sh
@@ -11,7 +11,7 @@ do
continue
fi
- if [[ "$dir" =~ ^.*.git$ ]]
+ if [[ "$dir" =~ ^.*\.git$ ]]
then
project_hook="$src/$dir/hooks/post-receive"
gitolite_hook="/home/git/gitlab-shell/hooks/post-receive"
@@ -23,7 +23,7 @@ do
else
for subdir in `ls "$src/$dir/"`
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"
gitolite_hook="/home/git/gitlab-shell/hooks/post-receive"
ln -s -f $gitolite_hook $project_hook