Created
December 26, 2010 17:43
-
-
Save developernotes/755529 to your computer and use it in GitHub Desktop.
Updates homebrew, installed packages and cleans up old packages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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