diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-19 15:06:04 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-19 15:06:04 +0000 |
commit | 4daa0fce202783562a8e9022f301d0591f2f2a26 (patch) | |
tree | 05c211fe6c788b8ce3a42c8aec3fe8a5a001cc5e /tool/downloader.rb | |
parent | a77e25ecd8138df16445a92582507b6ab001ddfa (diff) |
common.mk: ims=nil option
* common.mk (update-gems): use ims=nil option.
* tool/downloader.rb (Downloader.download): show the message if no
need to download in verbose mode.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/downloader.rb')
-rw-r--r-- | tool/downloader.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tool/downloader.rb b/tool/downloader.rb index 1149424881..c2fc638eae 100644 --- a/tool/downloader.rb +++ b/tool/downloader.rb @@ -9,10 +9,6 @@ class Downloader class RubyGems < self def self.download(name, *rest) - if File.exist?(name) - $stdout.puts "#{name} already exists" - return - end super("https://rubygems.org/downloads/#{name}", name, *rest) end end @@ -58,7 +54,13 @@ class Downloader # 'UnicodeData.txt', 'enc/unicode/data' def self.download(url, name, dir = nil, ims = true) file = dir ? File.join(dir, File.basename(name)) : name - return true if ims.nil? and File.exist?(file) + if ims.nil? and File.exist?(file) + if $VERBOSE + $stdout.puts "#{name} already exists" + $stdout.flush + end + return true + end url = URI(url) if $VERBOSE $stdout.print "downloading #{name} ... " |