Created
December 28, 2012 21:43
-
-
Save sadfuzzy/4402228 to your computer and use it in GitHub Desktop.
If you, like me (during RMagick gem and ImageMagick lib install) removed all Brew links from /usr/local/bin, use this script to generate them back
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
find /usr/local/Cellar | grep bin/ > ./usr_bin_local | |
ruby -ne "s=\$_; p=s.match(/\/bin\/(.+)/); b=p[1] unless p.nil?; cmd=%Q(ln -s #{s.chomp} /usr/local/bin/#{b});`#{cmd}`" ./usr_bin_local |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment