17e6ef1c06
Because the $FreeBSD$ keyword isn't expanded in the new version, we can't just do a diff, check the return value and ignore the output. Every new modules file, changed or not with regarding to the contents, has at least four lines in the diff output (line number, old line, seperator, new line). Only commit it if there are more than four lines difference between it.
21 lines
343 B
Bash
Executable File
21 lines
343 B
Bash
Executable File
#!/bin/sh
|
|
|
|
cd /g/hubgnats/gnats-aa/modules
|
|
|
|
make clean
|
|
make
|
|
|
|
diff=`diff modules-ports modules | wc | awk '{ print $1 }'`
|
|
|
|
echo Difference is $diff lines.
|
|
|
|
if [ $diff -gt 50 ]; then
|
|
date | mail -s "DIFF > $diff" edwin@FreeBSD.org
|
|
exit
|
|
fi
|
|
|
|
# Don't commit anything if only the $FreeBSD$ tag has changed
|
|
if [ $diff -ne 4 ]; then
|
|
make commit
|
|
fi
|