1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/tool/config_files.rb
nagachika e840269074 merge revision r48961 partially.
* tool/config_files.rb: use config.guess in gcc repo.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@49172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-07 13:38:02 +00:00

8 lines
261 B
Ruby

require 'open-uri'
ConfigFiles = "http://gcc.gnu.org/git/?p=gcc.git;a=blob_plain;f=%s;hb=HEAD"
def ConfigFiles.download(name, dir = nil)
data = URI(self % name).read
file = dir ? File.join(dir, name) : name
open(file, "wb", 0755) {|f| f.write(data)}
end