[OT] Scriptable DMG tool?

Bruce Robertson bfr at nwlink.com
Wed May 12 16:20:50 EDT 2004


> I build a lot of DMGs, but Apple's Disk Utility isn't scriptable so I
> have no way to automate that end of my build process.
> 
> Any of you know of a scriptable alternative to Disk Utility for making DMGs?


>From MacScripter

http://bbs.applescript.net/viewtopic.php?t=8186&highlight=disk+image

Use do shell script and hdiutil

Sample script posted on MacScripter for creating an encrypted disk image:


set desktop_path to ((path to desktop) as string)
set file_name to "encrypted.dmg"
set volume_name to "Encypted Disk"
set volume_size to "5m" --megabytes
do shell script "hdiutil create " & (quoted form of POSIX path of
(desktop_path & file_name)) & ¬
     " -encryption -volname " & (quoted form of volume_name) & ¬
     " -size " & volume_size & " -fs HFS+ -attach" 



More information about the Use-livecode mailing list