I'm not going to post a zip archive of scripts (I wouldn't download a random script and run it myself), so instead, here are the contents of the scripts I use with Xcode. You can save these as shell scripts, and trigger them from Xcode (under Preferences → Behaviours). You might need to run chmod +x /path/to/script
to get it to run, it depends how you're running it.
building.sh
error.sh
failed.sh
success.sh
unset.sh