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/install | |
parent | 5a6d71d143a6ea5f9747b25304aafa902ed381d0 (diff) | |
download | gitlab-shell-shards.tar.gz |
Refactor repository paths handling to allow multiple git mount pointsshards
Diffstat (limited to 'bin/install')
-rwxr-xr-x | bin/install | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/install b/bin/install index 9847ae1..73ac592 100755 --- a/bin/install +++ b/bin/install @@ -8,16 +8,20 @@ require_relative '../lib/gitlab_init' config = GitlabConfig.new key_dir = File.dirname("#{config.auth_file}") +repository_storage_paths = ARGV commands = [ - %W(mkdir -p #{config.repos_path}), %W(mkdir -p #{key_dir}), %W(chmod 700 #{key_dir}), %W(touch #{config.auth_file}), %W(chmod 600 #{config.auth_file}), - %W(chmod ug+rwX,o-rwx #{config.repos_path}), ] +repository_storage_paths.each do |repository_storage_path| + commands << %W(mkdir -p #{repository_storage_path}) + commands << %W(chmod ug+rwX,o-rwx #{repository_storage_path}) +end + commands.each do |cmd| print "#{cmd.join(' ')}: " if system(*cmd) |