make-snapshot: no wait unless needed

* tool/make-snapshot (package): no wait when using already
  exported source without modification, assuming exported 2
  seconds (the lowest timestamp resolution) ago or more.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-11-11 09:10:03 +00:00
Родитель f760bb4b39
Коммит df4c772724
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -214,7 +214,9 @@ def package(rev, destdir)
v = n
end
system(*%W"patch -d #{v} -p0 -i #{$patch_file}") if $patch_file
"take a breath, and go ahead".scan(/./) {|c|print c; sleep(c == "," ? 0.7 : 0.05)}; puts
if !$exported or $patch_file
"take a breath, and go ahead".scan(/./) {|c|print c; sleep(c == "," ? 0.7 : 0.05)}; puts
end
def (clean = []).add(n) push(n); n end
Dir.chdir(v) do
File.open(clean.add("cross.rb"), "w") do |f|