Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fixes annoying brew doctor messages caused by Truecrypt
#!/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
@trinitronx

This comment has been minimized.

Copy link
Owner Author

commented Apr 22, 2013

Fork of: jimjh/truecrypt_fix.bash

  • Fixed to create directory if not exists
  • Output errors
@seren

This comment has been minimized.

Copy link

commented Sep 10, 2013

You might want to add "set -e" (abort on error) to this script. Otherwise, if the "mv" fails, it could still run the "rm".

@LawnmowerMan

This comment has been minimized.

Copy link

commented Jan 4, 2014

Ok these run for me in mavericks!! many thanks

@blankartist

This comment has been minimized.

Copy link

commented Jan 5, 2014

Worked for me on Mavericks too. Ready to brew! Thanks.

@KainerW

This comment has been minimized.

Copy link

commented Feb 24, 2014

What to do with it?

@joshroman

This comment has been minimized.

Copy link

commented Mar 5, 2014

Thanks! Ready to brew...

@dirtyonekanobi

This comment has been minimized.

Copy link

commented Mar 6, 2014

Thank you! Worked great for me running Mavericks

@dpron

This comment has been minimized.

Copy link

commented Mar 20, 2014

https://gist.github.com/yiufung/7445219 fixes the errors spat out by calling "rm" after "mv" since that command already remove the origin file.

@sebastianconcept

This comment has been minimized.

Copy link

commented Mar 28, 2014

Thanks for sharing!

@DomT4

This comment has been minimized.

Copy link

commented Apr 11, 2014

Thanks for this! Fixed the Truecrypt-caused brew doctor errors perfectly.

@SteveBenner

This comment has been minimized.

Copy link

commented Apr 16, 2014

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.

@andfinally

This comment has been minimized.

Copy link

commented Jun 22, 2014

Thanks a lot! brew doctor nice and clean now!

@hyusetiawan

This comment has been minimized.

Copy link

commented Aug 26, 2014

this works greatly :) thank you!

@otzoran

This comment has been minimized.

Copy link

commented Feb 26, 2015

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
You can’t perform that action at this time.