mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
config_files.rb: show failure
* tool/config_files.rb (ConfigFiles.download): show failed URI. [ruby-core:61792] [Bug #9690] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
99d1f5f88b
commit
0b57f67531
3 changed files with 17 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
Tue Apr 1 17:29:35 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* tool/config_files.rb (ConfigFiles.download): show failed URI.
|
||||
[ruby-core:61792] [Bug #9690]
|
||||
|
||||
Tue Apr 1 12:06:49 2014 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* addr2line.c (rb_dump_backtrace_with_lines): don't depend hard coded
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
require 'open-uri'
|
||||
|
||||
ConfigFiles = "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=%s;hb=HEAD"
|
||||
ConfigFiles = "http://git0.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=%s;hb=HEAD"
|
||||
def ConfigFiles.download(name, dir = nil)
|
||||
data = URI(self % name).read
|
||||
uri = URI(self % name)
|
||||
data = uri.read
|
||||
file = dir ? File.join(dir, name) : name
|
||||
open(file, "wb", 0755) {|f| f.write(data)}
|
||||
rescue => e
|
||||
raise "failed to download #{name}\n#{e.message}: #{uri}"
|
||||
end
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
require File.expand_path('../config_files', __FILE__)
|
||||
ARGV.each {|n|
|
||||
STDOUT.print "Downloading #{n}..."; STDOUT.flush
|
||||
ConfigFiles.download(n)
|
||||
STDOUT.puts
|
||||
begin
|
||||
ConfigFiles.download(n)
|
||||
STDOUT.puts
|
||||
rescue => e
|
||||
STDOUT.puts
|
||||
abort("#{$0}: #{e.message}")
|
||||
end
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue