|
#1
|
|||
|
|||
I have every intention of familiarize me with the writing of scripts, not only for SD. I seek references on the subject.
The option “Run Shell script after Copy” could be enabled, only when needed, without having to repeat each time the operations in Terminal. |
#2
|
||||
|
||||
There are many books on Shell Scripting, including a number of well known ones from O'Reilly. I think there are even online versions of those books that can be accessed, perhaps even for free...
__________________
--Dave Nanian |
#3
|
|||
|
|||
I start to work immediately...
|
#4
|
|||
|
|||
Eureka!
Eureka!
I do not know, Dave, if you will approve? Here is an AppleScript which I make run by SD via the option “Run Shell after Copy complete” We can enable the option as need or leave it always enabled. --------------------------- tell application "Finder" to eject disk "MyBackup" -- wait for it repeat until (list disks) does not contain "MyBackup" delay 2 end repeat delay 30 set diskImage to POSIX path of "/Volumes/MyDisk/BackupFolder/MyBackup.sparseimage" do shell script "/usr/bin/hdiutil compact " & quoted form of diskImage ---------------------------- I used AppleScript editor to write and compile this script and I saved it as application (Compact.app) in Saved Setting. Obviously, if there are several scenarios of backups, each one must have its own adapted script. |
#5
|
||||
|
||||
Well... there can definitely be issues there, because SD! doesn't expect the volume to vanish during the "After" script...
__________________
--Dave Nanian |
#6
|
|||
|
|||
However, i certify that this script works perfectly. I tested it.
It ejects volume “MyBackup” and thus releases the image disc “MyBackup.sparseimage”. The operation hdiutil compact can then be carried out. And SuperDuper! finish its operations all gently, normally, as it should be. No problem, no message of error. I admit not too well understand how the last instruction “unmount MyBackup” can be carried out, but it's done. I'm merely stating a fact. |
#7
|
||||
|
||||
Oh, I believe you: I'm just saying that we don't expect that script to eject the image, so I can't guarantee it'll continue working...
__________________
--Dave Nanian |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Restoring from sparse image | catxtwo | General | 7 | 11-11-2008 03:25 PM |
Ever-Growing Sparse Image File... | Marco_Polo | General | 6 | 02-19-2007 10:21 AM |
Testing a sparse image... | macmidiguy | General | 5 | 05-14-2006 01:51 PM |
not ejecting sparse image after backup | rossb | General | 7 | 02-08-2006 05:20 PM |
Sparse image from aborted DMG backup? | Winston | General | 9 | 10-22-2005 12:28 PM |