|
|
10.4: Compact sparse disk images via contextual menu
Nem points out that this doesn't work with encrypted images. Does anyone know how to provide the script with the necessary password? I don't think it can be done using arguments or variables or pipes. How do you catch the prompt for the password? The -stdinpass option doesn't seem to do anything. I would like to be able to do this so I can maintain the smallest possible backup of my files on a USB thumb drive.
10.4: Compact sparse disk images via contextual menu
I believe
echo -n "password" | hdiutil compact -stdinpass $@ should work.---
10.4: Compact sparse disk images via contextual menu
I should of course mention that this puts your password in the clear in the Automator script (anyone that has access to the script can read your password).
10.4: Compact sparse disk images via contextual menu
Sorry for the multiple posts, but I think I found a way to fix the encrypted image issues without having to store the password or post it in the clear in the script.
It seems that hdiutil prompts for a password from stdin by default. So the script will run, receive no input, and error out from an authentication failure. If you give hdiutil no option for input (by directing input from something like /dev/null), then it resorts to a graphical password prompt. Use this code in the script and it should prompt for the password each time: --- |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.10 seconds |
|