-
-
Save trinitronx/5437061 to your computer and use it in GitHub Desktop.
Fixes annoying brew doctor messages caused by Truecrypt
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 | |
libs=( "/usr/local/lib/libmacfuse_i32.2.dylib" \ | |
"/usr/local/lib/libosxfuse_i32.2.dylib" \ | |
"/usr/local/lib/libosxfuse_i64.2.dylib" \ | |
"/usr/local/lib/libmacfuse_i64.2.dylib" \ | |
"/usr/local/lib/libosxfuse_i32.la" \ | |
"/usr/local/lib/libosxfuse_i64.la" \ | |
"/usr/local/lib/pkgconfig/osxfuse.pc" ) | |
truecrypt="/Applications/TrueCrypt.app/Contents/Resources/Library" | |
[ ! -d $truecrypt ] && mkdir -p $truecrypt | |
for lib in "${libs[@]}" | |
do | |
mv $lib "${truecrypt}/" && echo "Moved ${lib} to ${truecrypt}." || echo "Problem moving: ${lib} to ${truecrypt}" | |
rm $lib || echo "Problem removing: ${lib}" | |
ln -s "${truecrypt}/$(basename $lib)" ${lib} && echo "Linked ${lib}." || echo "Problem symlinking ${lib}" | |
done | |
brew prune | |
brew doctor |
Thanks a lot! brew doctor nice and clean now!
this works greatly :) thank you!
This little snippet demonstrates nicely the idea, but it lacks important verifications, symlinks aren't copied over and the pkgconfig files aren't moved to the right subdir.
Fixed, tested on Yosemite the gist is here.
Thanx to Aaron, James and Yiufung . enjoy...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This works, but I wanted to Rubify it! Anyone can check that out here: https://gist.github.com/SteveBenner/10938596.
It uses Ruby module FileUtils, but falls back to shell commands if you can't include the module for some reason. It also prevents you from running the script if you don't need to.