Is there a bash command to check to see if Time Machine has finished backing up? I'm writing a script that will rsycnc my Time Machine directory to a remote server using ssh. I've switched from a shell script to an AppleScript and then back to an Apple script and I don't really care what kind of script the solution will require. 

I've had success starting the backup process with this little snippet of code.

do shell script "/System/Library/CoreServices/backupd.bundle/Contents/Resources/backupd-helper &gt;/dev/null 2&gt;&amp;1 &amp;"


What I'm trying to do now is have an rsync command performed once that backup is completed. Is there any clean way in AppleScript to check to see if the backup process is completed? Or is there a good "hook" that you can use in bash to check to see if it's completed?
tmutil status is the Lion way now that we have a nice tool for this sort of query.

On newer OS, there is an undocumented command tmutil currentphase that shows the name of the current phase.