#!/bin/sh # # Post commit svn hook that sends an email to people about every new commit. # SVNLOOK=/usr/bin/svnlook REPOS="$1" REV="$2" MSG=`$SVNLOOK log -r "$REV" "$REPOS"` SVN_USER=`$SVNLOOK author -r "$REV" "$REPOS"` CHANGES=`$SVNLOOK changed -r "$REV" "$REPOS"` CURDATETIME=`date "+%A, %d %B %Y at %R"` /usr/sbin/sendmail -t << EOF From: $SVN_USER To: mateusz@something.com To: developer@somethingelse.com Subject: [svn] [r$REV] $MSG On $CURDATETIME, $SVN_USER commited changes on following files: $CHANGES EOF exit 0