Skip to content

Instantly share code, notes, and snippets.

@yiufung
Forked from trinitronx/truecrypt_fix.bash
Last active December 28, 2015 04:49
Show Gist options
  • Save yiufung/7445219 to your computer and use it in GitHub Desktop.
Save yiufung/7445219 to your computer and use it in GitHub Desktop.
#!/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
cp $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
@yiufung
Copy link
Author

yiufung commented Nov 13, 2013

Fork from @trinitronx/truecrypt_fix.bash.
Origin line 18 will report error as files were gone after mv. I changed line 17 "mv" to "cp". That's all.

@jbrains
Copy link

jbrains commented Sep 15, 2014

If I have Encryptr instead of TrueCrypt, then can I just move the libraries into Encryptr's bundle? It seems like it would work the same way, but if it obviously won't (and I can't see it), I wouldn't mind knowing. :)

@jbrains
Copy link

jbrains commented Sep 15, 2014

I tried it; nothing is obviously broken yet in Encryptr. If someone wants to warn me of a ticking time bomb, please do.

@otzoran
Copy link

otzoran 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