Created
July 3, 2012 09:02
-
-
Save joel/3038633 to your computer and use it in GitHub Desktop.
HomeBrew Fix
This file contains hidden or 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
sudo brew doctor | |
# Update HomeBrew | |
cd /usr/local && \ | |
sudo git add . && \ | |
sudo git reset --hard HEAD && \ | |
sudo git pull --rebase | |
#!/usr/bin/env ruby | |
class CleaningHomeBrew | |
BINARIES = ['cmake', 'imagemagick', 'jasper', 'jpeg', 'libevent', 'libtiff', 'little-cms','memcached','mysql','ossp-uuid','pidof','postgresql','redis','sphinx','wget'] | |
class << self | |
def clean | |
BINARIES.each { |binary| system "sudo brew cleanup && sudo brew link #{binary} && sudo brew uninstall #{binary} && sudo brew install #{binary}" } | |
end | |
end | |
end | |
begin | |
CleaningHomeBrew.clean | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment