Reputation: 4781
How can I make Apple-script file, which calls Disk Utility (usual OS X app) and makes it create DMG file from fixed folder (e.g. folder "../dir/dir2").
Is it possible to do this, using Apple-script? I use OS X 10.8 here.
Upvotes: 0
Views: 579
Reputation: 285072
You can do it without opening Disk Utility.app
set sourceFolder to "/Users/myuser/path/to/folder/"
set dmgPath to choose file name
do shell script "/usr/bin/hdiutil create " & quoted form of POSIX path of dmgPath & " -ov -srcfolder " & quoted form of sourceFolder
You will prompted to provide a destination file
Upvotes: 1