#!/usr/bin/osascript #Use at your own risk. set yojimboFolder to "~/Library/\"Application Support\"/Yojimbo" set yojimboBackups to "~/Library/\"Application Support\"/\"Yojimbo Backups\"" property appName : "My Yojimbo Backup" tell application "System Events" set growlIsRunning to (count of (every process whose name is "GrowlHelperApp")) > 0 end tell if growlIsRunning then tell application "GrowlHelperApp" set the allNotificationsList to {"Start", "Done"} set the enabledNotificationsList to {"Start", "Done"} register as application appName all notifications allNotificationsList default notifications enabledNotificationsList icon of application "Script Editor" end tell end if tellGrowl("Start", "Starting Backup", "Shutting Down Yojimbo for Backup") tell application "Yojimbo" quit end tell delay 2 -- sleep and wait on tellGrowl(myid, myTitle, myMessage) -- the growl notification routine global growlIsRunning if growlIsRunning then -- is growl running? tell application "GrowlHelperApp" notify with name myid title myTitle description myMessage application name appName with sticky end tell end if end tellGrowl #set shellscript to "mkdir -p " & yojimboBackups & "; cp -R" & " " & yojimboFolder & "/* " & yojimboBackups set shellscript to "mkdir -p " & yojimboBackups & "; rsync -a " & yojimboFolder & "/ " & yojimboBackups set scriptresult to do shell script shellscript tellGrowl("Done", appName, "Ran Backup Yojimbo with shell script: " & shellscript & " : " & scriptresult)