diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-08-19 20:24:37 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-08-19 20:24:37 +0200 |
commit | 761373a559d04232e0281d02a17a47d735f87fd2 (patch) | |
tree | 9f53347c741be02fe2adb02f8827c3892fb06f6e /bin | |
parent | ff346593e3256bffec4c72c31bad6a68f9016125 (diff) | |
download | jenkins.debian.net-761373a559d04232e0281d02a17a47d735f87fd2.tar.xz |
reproducible: deal with diversion by zero
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_html_dashboards.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/reproducible_html_dashboards.sh b/bin/reproducible_html_dashboards.sh index 07303cf6..8ab822f3 100755 --- a/bin/reproducible_html_dashboards.sh +++ b/bin/reproducible_html_dashboards.sh @@ -158,13 +158,13 @@ gather_suite_arch_stats() { COUNT_DEPWAIT=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='$SUITE' AND s.architecture=\"$ARCH\" AND r.status = \"depwait\"") COUNT_OTHER=$(( $COUNT_SOURCELESS+$COUNT_NOTFORUS+$COUNT_BLACKLISTED+$COUNT_DEPWAIT )) PERCENT_TOTAL=$(echo "scale=1 ; ($COUNT_TOTAL*100/$AMOUNT)" | bc) - PERCENT_GOOD=$(echo "scale=1 ; ($COUNT_GOOD*100/$COUNT_TOTAL)" | bc) - PERCENT_BAD=$(echo "scale=1 ; ($COUNT_BAD*100/$COUNT_TOTAL)" | bc) - PERCENT_UGLY=$(echo "scale=1 ; ($COUNT_UGLY*100/$COUNT_TOTAL)" | bc) - PERCENT_NOTFORUS=$(echo "scale=1 ; ($COUNT_NOTFORUS*100/$COUNT_TOTAL)" | bc) - PERCENT_DEPWAIT=$(echo "scale=1 ; ($COUNT_DEPWAIT*100/$COUNT_TOTAL)" | bc) - PERCENT_SOURCELESS=$(echo "scale=1 ; ($COUNT_SOURCELESS*100/$COUNT_TOTAL)" | bc) - PERCENT_OTHER=$(echo "scale=1 ; ($COUNT_OTHER*100/$COUNT_TOTAL)" | bc) + PERCENT_GOOD=$(echo "scale=1 ; ($COUNT_GOOD*100/$COUNT_TOTAL)" | bc || echo 0) + PERCENT_BAD=$(echo "scale=1 ; ($COUNT_BAD*100/$COUNT_TOTAL)" | bc || echo 0) + PERCENT_UGLY=$(echo "scale=1 ; ($COUNT_UGLY*100/$COUNT_TOTAL)" | bc || echo 0) + PERCENT_NOTFORUS=$(echo "scale=1 ; ($COUNT_NOTFORUS*100/$COUNT_TOTAL)" | bc || echo 0) + PERCENT_DEPWAIT=$(echo "scale=1 ; ($COUNT_DEPWAIT*100/$COUNT_TOTAL)" | bc || echo 0) + PERCENT_SOURCELESS=$(echo "scale=1 ; ($COUNT_SOURCELESS*100/$COUNT_TOTAL)" | bc || echo 0) + PERCENT_OTHER=$(echo "scale=1 ; ($COUNT_OTHER*100/$COUNT_TOTAL)" | bc || echo 0) } # |