From 08ed6b2759f7dbb2caa3c817832bca8a2681461b Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sat, 17 Dec 2016 01:31:42 +0000 Subject: reproducible Debian: correctly count number of stale logfiles Signed-off-by: Holger Levsen --- bin/reproducible_maintenance.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh index d720f3e1..bab44c76 100755 --- a/bin/reproducible_maintenance.sh +++ b/bin/reproducible_maintenance.sh @@ -409,7 +409,11 @@ if [ "$HOSTNAME" = "$MAINNODE" ] && [ $(date -u +%H) -eq 0 ] ; then TMPFILE=$(mktemp --tmpdir=$TEMPDIR maintenance-XXXXXXXXXXXX) mv $PROBLEM $TMPFILE ( echo "A few entries per day are normal, a few dozens or hundreds probably not." - echo "$(egrep -c '(https://|stale\ builds\ found)' $TMPFILE || true) entries found:" + if grep -q https $TMPFILE ; then + echo "$(grep -c https $TMPFILE) entries found:" + else + echo "$(grep -c 'stale builds found' $TMPFILE || true) entries found:" + fi echo cat $TMPFILE ) | mail -s "$(basename $PROBLEM) found" qa-jenkins-scm@lists.alioth.debian.org rm -f $TMPFILE -- cgit v1.2.3-54-g00ecf