From c58df62c75de8172ee2e7a311ade794e3b8a8772 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Mon, 12 Jun 2017 15:22:42 +0200 Subject: reproducible Debian: correctly recognize 0 builds per day Signed-off-by: Holger Levsen --- bin/reproducible_nodes_info.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/reproducible_nodes_info.sh b/bin/reproducible_nodes_info.sh index 034b0b02..2bb686ce 100755 --- a/bin/reproducible_nodes_info.sh +++ b/bin/reproducible_nodes_info.sh @@ -64,6 +64,7 @@ for i in $BUILD_NODES ; do echo "$l builds/day ($j/$k) on $i" >> $TMPFILE2 DATE=$(date '+%Y-%m-%d %H:%M' -d "-1 days") m=$(query_db "SELECT count(build_date) FROM stats_build AS r WHERE ( r.node1='$i' OR r.node2='$i' ) AND r.build_date > '$DATE' " 2>/dev/null) + if [ "$m" = "" ] ; then m=0 ; fi echo "$m builds in the last 24h on $i" >> $TMPFILE3 done rm $TMPFILE1 >/dev/null -- cgit v1.2.3-70-g09d2