Skip to content

Instantly share code, notes, and snippets.

@joel
Created July 6, 2012 10:10
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 joel/3059360 to your computer and use it in GitHub Desktop.
Save joel/3059360 to your computer and use it in GitHub Desktop.
Fix HomeBrew Binary unlinked after update Gcc
#!/usr/bin/env ruby
class CleaningHomeBrew
# Your binaries unlinked
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
# ./fix_homebrew.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment