summaryrefslogtreecommitdiff
path: root/tool/config_files.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-14 04:01:54 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-14 04:01:54 +0000
commitbbe047d4c7ae008d8c5bbf7df84c5c31dc810b8c (patch)
treec304504a72ee45f5bcadc6d17f93bf5f71b038f9 /tool/config_files.rb
parent19faee195a7f5a9cc5e24b64cc655f79c10ac872 (diff)
download config files
* common.mk (update-config_files): rule to download config files. * tool/config.guess, tool/config.sub: remove and download from the upstream. * tool/get-config_files: download config files from GNU. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/config_files.rb')
-rwxr-xr-xtool/config_files.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/tool/config_files.rb b/tool/config_files.rb
new file mode 100755
index 0000000000..998b8b72ec
--- /dev/null
+++ b/tool/config_files.rb
@@ -0,0 +1,13 @@
+#!/usr/bin/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
+
+if $0 == __FILE__
+ ARGV.each {|n| ConfigFiles.download(n)}
+end