I'm trying to write a svn pre-commit hook which will give an error if certain keywords exist in certain file types.
The case for me is, if the file is a .java, .jsp or .jspf file I want to make sure that "http://" and "https://" do not exist in them. So far, I can throw an error if the keyword exists in any file, but not JUST the filetypes I want to check.
Here's what I have so far:
$SVNLOOK diff -t "$TXN" "$REPOS" | grep -i "https://" > /dev/null && { echo "Your commit has been blocked because it contains the keyword https://." 1>&2; exit 1; }