Using the following code in the Collabnet SVN's pre commit script to restrict the specific file extensions to get committed, but it is committing all the files. Could you please tell where I'm going wrong.
#!/bin/sh
REPOS="$1"
TXN="$2"
SVNLOOK=/home/csvn/csvn/bin/svnlook
LOGMSG=`$SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]" | wc -c`
if [ "$LOGMSG" -lt 10 ];
then
echo -e "\n===========================================================" 1>&2
echo -e "|| COMMENTS ARE MADE MANDATORY.PLEASE ENTER RELEVANT COMMENT & COMMIT AGAIN Sanjeev sas||" 1>&2
echo -e "===========================================================" 1>&2
exit 1
fi
$SVNLOOK changed -t $TXN $REPOS | awk '
BEGIN {
FILTER=".(sh|xls|xlsx|pdf|jpg|JPG|gif|GIF|png|PNG|doc|DOC|docx|DOCX|mpg|swf|avi|mp3|mp4|zip|rar|gz|csv|o|obj|tar|gz|JPEG|jpeg|WMV|wmv|DAT|dat|3GP|3gp|MPEG|mpeg|VOD|vod|ear|jar|war|exe|ppt|PPT|PPTX|pptx|7z|iso|ISO|EAR|WAR|JAR|msg|MSG|rtf|RTF|xlsm|XLSM|vsd|VSD|dot|DOT|camrec|ECF|ecf|mff|MFF|class|CLASS)$"
}
{
for (i = 1; i < 2; i++) $i = ""; sub(/^ */, "");
if(match(tolower($1),FILTER))
{
print "File" $1 "is not allowed file type to commit"
exit 1
}
}'
exit 0