Created
November 3, 2012 23:46
-
-
Save NapoleonWils0n/4009356 to your computer and use it in GitHub Desktop.
macosx: create an encrypted dmg for dropbox
This file contains hidden or 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 | |
# Create an encrypted dmg for Dropbox | |
# Command notes: we echo the password to hdiutil and use the -stdinpass to recieve it via stdin | |
echo -n "password" | hdiutil create -encryption AES-256 -size 5m -fs HFS+J -stdinpass -volname MountedVolumeName DiskImageName.dmg | |
# attach and detach the dmg | |
hdiutil attach /path/to/dmg/DiskImageName.dmg | |
hdiutil detach /Volumes/MountedVolumeName | |
# resize disk image | |
hdiutil resize -size 50m DiskImageName.dmg | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment