1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2014-12-15 01:30:30 +00:00
parent 238d8586df
commit 825680a106

View file

@ -180,10 +180,17 @@ def package(vcs, rev, destdir, tmp = nil)
else else
v = "ruby" v = "ruby"
puts "Exporting #{rev}@#{revision}" 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") warn("Export failed")
return return
end 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 end
Dir.chdir(tmp) if tmp Dir.chdir(tmp) if tmp