Created
September 17, 2010 17:18
-
-
Save photuris/584575 to your computer and use it in GitHub Desktop.
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 | |
COMMAND='/Applications/TrueCrypt.app/Contents/MacOS/TrueCrypt' | |
DISKNAME='Development' | |
IMAGEFILE='/Users/Joshua/Development' | |
# Is the volume already mounted? | |
if [ -z `ls -1 /Volumes/ | grep $DISKNAME` ] ; then | |
echo Mounting Volume \"$DISKNAME\" | |
# Automount, prompting for password | |
$COMMAND --mount $IMAGEFILE /Volumes/$DISKNAME | |
# OS X mounts "external" volumes with -noowners by default, | |
# so we remount with full ownership enabled. | |
# Maybe there's a cleaner workaround for this... | |
sudo mount -u -o owners /Volumes/Development | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment