Reduce nesting in 'brew up'.

This commit is contained in:
Adam Vandenberg 2010-06-15 21:48:33 -07:00
parent b9bb078642
commit 07914a48ee

View File

@ -163,7 +163,8 @@ begin
end end
when 'up', 'update' when 'up', 'update'
if system "/usr/bin/which -s git" abort "Please `brew install git' first." unless system "/usr/bin/which -s git"
require 'update' require 'update'
updater = RefreshBrew.new updater = RefreshBrew.new
old_revision = updater.current_revision old_revision = updater.current_revision
@ -189,9 +190,6 @@ begin
puts "No formulae were updated." unless updater.pending_formulae_changes? puts "No formulae were updated." unless updater.pending_formulae_changes?
end end
end end
else
abort "Please `brew install git' first."
end
when 'ln', 'link' when 'ln', 'link'
ARGV.kegs.each {|keg| puts "#{keg.link} links created for #{keg}"} ARGV.kegs.each {|keg| puts "#{keg.link} links created for #{keg}"}