#!/bin/sh

REPOS="$1"
TXN="$2"

SVNLOOK=/opt/local/bin/svnlook
SED=/usr/bin/sed
GREP=/usr/bin/grep

$SVNLOOK changed -t "$TXN" "$REPOS" | $SED -n -E 's%^(A.|U.|.U)..(Developer/.*[^/])$%\2%p' | while read FILE; do
	echo $FILE | $GREP -E '\.tpl$' > /dev/null
	if [ $? -ne 0 ]; then
		echo "Name of file $FILE does not end with .tpl" 1>&2
		exit 1
	fi
done

exit $?


