mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
9 lines
280 B
Ruby
9 lines
280 B
Ruby
|
require 'open-uri'
|
||
|
|
||
|
ConfigFiles = "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=%s;hb=HEAD"
|
||
|
def ConfigFiles.download(name, dir = nil)
|
||
|
data = open(self % name, &:read)
|
||
|
file = dir ? File.join(dir, name) : name
|
||
|
open(file, "wb", 0755) {|f| f.write(data)}
|
||
|
end
|