aboutsummaryrefslogtreecommitdiffstats
path: root/bin/brew
diff options
context:
space:
mode:
authorEloy Duran2009-09-08 00:02:28 +0200
committerEloy Duran2009-09-17 00:24:11 +0200
commit871b25cf0b81d93233eaecac7efdf7d577c51bfc (patch)
tree67a5efb940685e834d738aa4da91d2c2b2681c13 /bin/brew
parent4fe374dafde412814d0398314852b7096332ed3d (diff)
downloadhomebrew-871b25cf0b81d93233eaecac7efdf7d577c51bfc.tar.bz2
Update Homebrew and list the updated formulae.
Diffstat (limited to 'bin/brew')
-rwxr-xr-xbin/brew11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/brew b/bin/brew
index bd57b7103..79ac11520 100755
--- a/bin/brew
+++ b/bin/brew
@@ -110,6 +110,17 @@ begin
end
+ when 'up', 'update'
+ require 'refresh_brew'
+ updater = RefreshBrew.new
+ unless updater.update_from_masterbrew!
+ ohai "Already up-to-date."
+ else
+ ohai "Updated Homebrew to: #{updater.current_revision}"
+ ohai "No formulae were updated." unless updater.pending_formulae_changes?
+ ohai "The following formulae were updated: #{updater.updated_formulae.join(', ')}"
+ end
+
when 'ln', 'link'
ARGV.kegs.each {|keg| puts "#{keg.link} links created for #{keg}"}