Created
January 25, 2010 23:13
-
-
Save sirlancelot/286375 to your computer and use it in GitHub Desktop.
Script that can be used during Mac OS X startup to mount a disk image to any path on the filesystem.
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/sh | |
## | |
# Mount my development websites folder | |
# | |
# NOTE: Because this uses Mac OS X mounting techniques, all mac format | |
# images are supported and many other UNIX filesystem formats. | |
# (My Development Sites image is stored encrypted.) | |
# Location of the image to be mounted | |
IMAGE="$HOME/Documents/Development Sites.sparsebundle" | |
# Path to an empty folder where the contents of the image can be found | |
MOUNT="$HOME/Sites" | |
# Do the magic | |
# -owners on = Honor file/folder permissions in image | |
# -nobrowse = Don't show in Finder (-mountpoint is still visible) | |
# -mountpoint = Attach to a folder. | |
hdiutil attach -owners on -nobrowse -mountpoint "$MOUNT" "$IMAGE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment