From b4f7bf86f1c7f9ede5dc064683dae24cfe0657c5 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 2 Oct 2013 18:37:52 +0000 Subject: 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 --- tool/rbinstall.rb | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'tool') diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index b47b6e15fe..6eba734871 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -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 -- cgit v1.2.3