mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
a77e25ecd8
commit
4daa0fce20
2 changed files with 8 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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} ... "
|
||||
|
|
Loading…
Reference in a new issue