View Single Post
  #9  
Old 06-03-2009, 01:25 AM
sjk's Avatar
sjk sjk is offline
Registered User
 
Join Date: May 2004
Location: Eugene
Posts: 252
Yup, much simpler than I expected …

You don't even need to use AppleScript for that; it could just be a shell script like:

Code:
#!/bin/sh

for i in 1 2 3; do
   /usr/bin/hdiutil compact "/Volumes/Drobo/backup $i.sparseimage"
done
Or even a one-liner directly in the crontab file would work.

I've recently converted regular sparse images to sparse bundles and compacting them runs much quicker so I wouldn't mind switching to doing it after every backup instead of less frequently under certain conditions. I thought your script might have some clever example for the latter, but instead it helped me realize it can be simpler now.

Thanks!
Reply With Quote