diff options
author | Alejandro RodrÃguez <alejorro70@gmail.com> | 2016-06-29 13:58:20 -0400 |
---|---|---|
committer | Alejandro RodrÃguez <alejorro70@gmail.com> | 2016-06-29 13:58:20 -0400 |
commit | 18b4d39ac7172cb02cec63e7bf1cc21807a9b3f0 (patch) | |
tree | 810dd76a8b3bea1048e5951cefd4d1eeee5aaefd /bin/create-hooks | |
parent | 5a6d71d143a6ea5f9747b25304aafa902ed381d0 (diff) | |
download | gitlab-shell-shards.tar.gz |
Refactor repository paths handling to allow multiple git mount pointsshards
Diffstat (limited to 'bin/create-hooks')
-rwxr-xr-x | bin/create-hooks | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/bin/create-hooks b/bin/create-hooks index 4efa650..241e10b 100755 --- a/bin/create-hooks +++ b/bin/create-hooks @@ -7,10 +7,14 @@ require_relative '../lib/gitlab_init' require File.join(ROOT_PATH, 'lib', 'gitlab_projects') -Dir["#{GitlabConfig.new.repos_path}/*/*.git"].each do |repo| - begin - GitlabProjects.create_hooks(repo) - rescue Errno::ENOENT - # The user must have deleted their repository. Ignore. +repository_storage_paths = ARGV + +repository_storage_paths.each do |repo_path| + Dir["#{repo_path.chomp('/')}/*/*.git"].each do |repo| + begin + GitlabProjects.create_hooks(repo) + rescue Errno::ENOENT + # The user must have deleted their repository. Ignore. + end end end |