We're certainly looking at supporting automator in the future, but I can't make any promises.
Since Automator is really AppleScript, pretty much, it might be easiest to do this in AppleScript. But, it might also be even easier to just do it in the Shell, since the tool you're trying to use to split the image is actually "hdiutil", which is a shell tool. This could be a great time to add shell scripting to your personal toolkit.
The command to use is basically:
hdiutil convert path-to-sparse-image UDRO -segmentSize 4.5g -o somename.dmg
which converts the sparse image to a read-only DMG in 4.5GB parts. More details can be found in the "man" page for hdiutil:
man hdiutl
To put this in a shell script, you'd use something like:
#!/bin/sh
hdiutil convert "$6" UDRO -segmentSize 4.5g -o "$3.dmg"
We automatically give you various things when we call your shell script (see p43 of the User's Guide), including the name of the destination volume and the name of the sparse image. So, $6 is the name of the image (which you're converting), and $3 is the name of the destination volume. So, you're converting the sparse image to a series of DMGs named after the destination volume.
If, instead, you want to pass this information to an AppleScript, you can use "osascript" to do so, which is the way to call AppleScript from the shell.
As above, you can do
man osascript
to get documentation. And, since you can pass in arguments to the script, you can hand it the information we're providing you about the image name, etc:
#!/bin/sh
osascript thescript.scpt "$1" "$2" "$3" "$4" "$5" "$6"
which would call "thescript.scpt" with the 6 arguments we're passing you.
No doubt that's a lot to absorb, but I hope it'll get you started.
__________________
--Dave Nanian
|