rbinstall.rb: reorder

* tool/rbinstall.rb: install default targets (:local, :ext) first,
  very time consuming tasks later.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-10-02 18:37:52 +00:00
parent 13e60f2bff
commit b4f7bf86f1

View File

@ -757,18 +757,23 @@ include FileUtils::NoWrite if $dryrun
@fileutils_output = STDOUT
@fileutils_label = ''
all = $install.delete(:all)
$install << :local << :ext if $install.empty?
$install.each do |inst|
installs = $install.map do |inst|
if !(procs = $install_procs[inst]) || procs.empty?
next warn("unknown install target - #{inst}")
end
procs.each do |block|
dir = Dir.pwd
begin
block.call
ensure
Dir.chdir(dir)
end
procs
end
installs.flatten!
installs.uniq!
installs |= $install_procs[:all] if all
installs.each do |block|
dir = Dir.pwd
begin
block.call
ensure
Dir.chdir(dir)
end
end