Skip to content

Instantly share code, notes, and snippets.

@developernotes
Created December 26, 2010 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save developernotes/755529 to your computer and use it in GitHub Desktop.
Save developernotes/755529 to your computer and use it in GitHub Desktop.
Updates homebrew, installed packages and cleans up old packages
require 'utils'
class UpdateAll
def run
display("Updating homebrew and all installed packages, also cleaning up old packages:")
safe_system("brew update && brew upgrade && brew cleanup")
end
def display(message, &block)
if $stdout.tty? and not ARGV.flag? '--quiet'
ohai message
end
end
end
runner = UpdateAll.new
runner.run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment