Skip to content

Instantly share code, notes, and snippets.

@krono
Created March 31, 2013 17:04
Show Gist options
  • Save krono/5281305 to your computer and use it in GitHub Desktop.
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.
#!/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