diff options
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/rbinstall.rb | 21 |
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 |