From 4daa0fce202783562a8e9022f301d0591f2f2a26 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 19 Nov 2014 15:06:04 +0000 Subject: 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 --- common.mk | 2 +- tool/downloader.rb | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/common.mk b/common.mk index b29635656c..7b0f019aae 100644 --- a/common.mk +++ b/common.mk @@ -893,7 +893,7 @@ update-gems: PHONY -I../tool -rdownloader -answ \ -e 'gem, ver = *$$F' \ -e 'gem = "#{gem}-#{ver}.gem"' \ - -e 'Downloader::RubyGems.download(gem)' \ + -e 'Downloader::RubyGems.download(gem, nil, nil)' \ bundled_gems UPDATE_LIBRARIES = no 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} ... " -- cgit v1.2.3