aboutsummaryrefslogtreecommitdiffstats
path: root/Tools/scripts
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2008-07-14 11:56:23 +0800
committeredwin <edwin@FreeBSD.org>2008-07-14 11:56:23 +0800
commit41040865bbfee118c59f1cca1a98e8a878dfe356 (patch)
treed965a4faa2db927889d2950afb1b95c3b4bbe28c /Tools/scripts
parent0968d2c76a10a512f1fd89d0e7aa37b2d7109b70 (diff)
downloadfreebsd-ports-gnome-41040865bbfee118c59f1cca1a98e8a878dfe356.tar.gz
freebsd-ports-gnome-41040865bbfee118c59f1cca1a98e8a878dfe356.tar.zst
freebsd-ports-gnome-41040865bbfee118c59f1cca1a98e8a878dfe356.zip
Have a different approach on how to check if the modules file has changed.
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.
Diffstat (limited to 'Tools/scripts')
-rwxr-xr-xTools/scripts/modules/update.sh16
1 files changed, 7 insertions, 9 deletions
diff --git a/Tools/scripts/modules/update.sh b/Tools/scripts/modules/update.sh
index 4653941e5802..a3f98eadb4de 100755
--- a/Tools/scripts/modules/update.sh
+++ b/Tools/scripts/modules/update.sh
@@ -1,22 +1,20 @@
#!/bin/sh
-# $FreeBSD$
-
cd /g/hubgnats/gnats-aa/modules
make clean
make
-pl=`wc -l modules-ports | awk '{ print $1 }'`
-ml=`wc -l modules | awk '{ print $1 }'`
-diff=`expr $pl - $ml`
-if [ $diff -lt 0 ]; then
- diff=`expr 0 - $diff`
-fi
+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
-make commit
+# Don't commit anything if only the $FreeBSD$ tag has changed
+if [ $diff -ne 4 ]; then
+ make commit
+fi