summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-02 18:37:52 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-02 18:37:52 +0000
commitb4f7bf86f1c7f9ede5dc064683dae24cfe0657c5 (patch)
tree1f93112544b9b5f43ee0a4097cf0a9d3e8f289ef /tool
parent13e60f2bff7c2a140cbdc123c3a28c9b8b66d963 (diff)
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
Diffstat (limited to 'tool')
-rwxr-xr-xtool/rbinstall.rb21
1 files changed, 13 insertions, 8 deletions
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