January 12, 2006

Growling

Svn GrowlAfter reading drunkenbatman's rampant cheerleading for Growl, I decided to give it another whirl. I'm actually finding various handy uses for it, and my favourite has got to be for reporting on subversion updates.

This is particularly handy if you're updating from large or slow repositories, and want to get on with other work while you wait for the update to complete. Basically, leave the update running and Growl will pop up a bubble to let you know when the update has finished.

Here's the command-line magic to make it work:

svn update && echo "SVN `pwd` is up-to-date" | growlnotify "SVN Complete"

Pretty simple, huh?

I use this in a shell script to handle lots of updates in one go, which is particularly useful for catching up on multiple projects before going offline (e.g. when hitting the road):

#!/bin/bash

for a in repo1 repo2 repo3 ; do
echo "Updating $a..."
cd $a
svn update && echo "$a is up-to-date" | growlnotify "SVN Complete"
cd ..
done

Posted by savs at January 12, 2006 6:42 PM