Shirt Pocket Discussions

Shirt Pocket Discussions (https://www.shirt-pocket.com/forums/index.php)
-   General (https://www.shirt-pocket.com/forums/forumdisplay.php?f=6)
-   -   Can I use DropDMG to split sparseimage 4 DVD (https://www.shirt-pocket.com/forums/showthread.php?t=1496)

brantwinter 08-01-2006 08:35 AM

Can I use DropDMG to split sparseimage 4 DVD
 
Hi - I am thr prud new owner of a SupderDuper licence ! I am looking to maybe try and keep a copy of my sparseimage on dvd about once every 6 months away from the house. I need to find a way to automate the process of splitting the sparse image into 4Gb chunks to burn to DVD. I have found a product called DropDMG hich looks awesome as it has Automator support. I was quite dissapointed to find SuperDuper did not have such Automator support. I figured that somehow I could trigger the Automator action anyway from SD once it had finished a copy using the GUI, but I realised I would have to hard code the resultant sparse image name ( not a big issue ) does anyone know how to call an Automator action from the SD GUI and secondly does anyone know if SD intends to include Automator support in the future.

Great product by the way !

dnanian 08-01-2006 08:46 AM

We allow you to call out to a shell script after the copy using the Advanced tab, Brant, so you can do all sorts of things, including calling Automator Actions, AppleScripts, etc.

brantwinter 08-01-2006 08:55 AM

Thansk for the fast reply ! Trouble is, I am not quite sure how to call the Automator script as the GUI references calling a shell script. I have no idea how to write this ! Will SD support Automator in the future ?

dnanian 08-01-2006 09:12 AM

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.

brantwinter 08-01-2006 09:21 AM

That sure does give me something to get started with ! Do I need to chmod the .scpt file ?

Thanks again !

dnanian 08-01-2006 09:45 AM

You'd need to chmod the shell script, but the scpt is an applescript and doesn't need to be marked as executable.


All times are GMT -4. The time now is 06:46 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.