diff --git a/setup_pre_commit_hook.sh b/setup_pre_commit_hook.sh index d5d423e..dd87116 100755 --- a/setup_pre_commit_hook.sh +++ b/setup_pre_commit_hook.sh @@ -14,7 +14,7 @@ cp pre-push ~/.git-templates/hooks echo -e "\nFind all the git repos under $DIR directory" ALL_GIT_REPOS=$(find ~/ -name .git | sed 's/\.git//g') -for repo in $ALL_GIT_REPOS; do +for repo in "$ALL_GIT_REPOS"; do echo -e "\nRunning git init on $repo under $DIR to copy the global hook"; cd $repo; git init; done;