X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/2a2de566d01bb09e43fcb0040035ba81912c4d69..a27e0874320e408124fee837b355995350bbc7ee:/services/api/script/migrate-gitolite-to-uuid-storage.rb diff --git a/services/api/script/migrate-gitolite-to-uuid-storage.rb b/services/api/script/migrate-gitolite-to-uuid-storage.rb index 2b96a7dfad..169509f63b 100755 --- a/services/api/script/migrate-gitolite-to-uuid-storage.rb +++ b/services/api/script/migrate-gitolite-to-uuid-storage.rb @@ -35,7 +35,7 @@ DEBUG = 1 # load and merge in the environment-specific application config info # if present, overriding base config parameters as specified path = File.dirname(__FILE__) + '/config/arvados-clients.yml' -if File.exists?(path) then +if File.exist?(path) then cp_config = YAML.load_file(path)[ENV['RAILS_ENV']] else puts "Please create a\n " + File.dirname(__FILE__) + "/config/arvados-clients.yml\n file" @@ -137,6 +137,9 @@ class Repository File.join(repos_root, "#{uuid}.git")) rescue Errno::ENOENT end + if name == "arvados" + Dir.chdir(repos_root) { File.symlink("#{uuid}.git/", "arvados.git") } + end end end @@ -183,7 +186,7 @@ end begin # Get our local gitolite-admin repo up to snuff - if not File.exists?(gitolite_admin) then + if not File.exist?(gitolite_admin) then ensure_directory(gitolite_tmpdir, 0700) Dir.chdir(gitolite_tmpdir) `git clone #{gitolite_url}`