Created
March 31, 2013 17:04
-
-
Save krono/5281305 to your computer and use it in GitHub Desktop.
Gettext via brew was updated and the old one cleaned, yet, some libs still directly linked to the old gettext directly. This gist fixes this problems by reinstalling all affected 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
#!/bin/bash | |
pushd /usr/local/lib | |
for package in $( | |
for i in *.dylib; do | |
if otool -L $i | grep -q gettext/0.18.1.1; then | |
# get pacakge out ouf library | |
echo $(basename $(dirname $(dirname $(dirname $(readlink $i))))); | |
fi; | |
done | sort | uniq); do | |
# what options was this package installed with. | |
iw=$(brew info $p | grep --color=none Installed\ with | sed -e 's/Installed\ with://' -e 's/,//g'); | |
# just FYI | |
echo $p $iw; | |
brew reinstall $p $iw; | |
done | |
popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment