aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-15 01:30:30 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-15 01:30:30 +0000
commit825680a106df7e1508e67cf383f155ec1823d1de (patch)
tree1923052345a9a4c323921305b4baeda69eafd30a
parent238d8586dfefcf841045edaadac398d6be0f2a93 (diff)
downloadruby-825680a106df7e1508e67cf383f155ec1823d1de.tar.gz
make-snapshot: reuse downloaded files
* tool/make-snapshot (package): reuse already downloaded files if existing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rwxr-xr-xtool/make-snapshot9
1 files changed, 8 insertions, 1 deletions
diff --git a/tool/make-snapshot b/tool/make-snapshot
index fa70d400cb..9e05e66ee9 100755
--- a/tool/make-snapshot
+++ b/tool/make-snapshot
@@ -180,10 +180,17 @@ def package(vcs, rev, destdir, tmp = nil)
else
v = "ruby"
puts "Exporting #{rev}@#{revision}"
- unless vcs.export(revision, url, tmp ? File.join(tmp, v) : v) {|line| print line}
+ exported = tmp ? File.join(tmp, v) : v
+ unless vcs.export(revision, url, exported) {|line| print line}
warn("Export failed")
return
end
+ if $srcdir
+ Dir.glob($srcdir + "/{tool/config.{guess,sub},gems/*.gem}") do |file|
+ puts "copying #{file}"
+ FileUtils.cp(file, exported + file[$srcdir.size..-1], preserve: true)
+ end
+ end
end
Dir.chdir(tmp) if tmp