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:
parent
238d8586df
commit
825680a106
1 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue