X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/2d56bd2e4722e9c664f7605b3a46b505a30782db..0f644e242ef37c911ad3dc25aca8135c339de349:/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 8db1a0edad..91acf3e256 100755 --- a/services/api/script/migrate-gitolite-to-uuid-storage.rb +++ b/services/api/script/migrate-gitolite-to-uuid-storage.rb @@ -1,4 +1,8 @@ #!/usr/bin/env ruby +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + # # Prior to April 2015, Arvados Gitolite integration stored repositories by # name. To improve user repository management, we switched to storing @@ -35,7 +39,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" @@ -186,7 +190,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}`