summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@debian.org>2017-01-19 13:53:53 +0100
committerHolger Levsen <holger@layer-acht.org>2017-01-19 13:55:12 +0100
commit7745ba7928d7c757bcb241fac6da7a1fa75c969c (patch)
tree60d83070fddbb53a10b980684b8d74c6a3f42638 /bin
parent877c03019935f46466295e14035ed99a0f9ad048 (diff)
downloadjenkins.debian.net-7745ba7928d7c757bcb241fac6da7a1fa75c969c.tar.xz
reproducible debian: be sure to have an empty variable at the start of the loop...
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_html_dashboard.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/reproducible_html_dashboard.sh b/bin/reproducible_html_dashboard.sh
index d4031118..4936adfc 100755
--- a/bin/reproducible_html_dashboard.sh
+++ b/bin/reproducible_html_dashboard.sh
@@ -302,9 +302,10 @@ _average_builds_per_day() {
for ARCH in ${ARCHS} ; do
local OLDEST_BUILD="$(query_db "SELECT build_date FROM stats_build WHERE architecture='$ARCH' ORDER BY build_date ASC LIMIT 1")"
local DAY_DIFFS="$(( ($(date -d "$DATE" +%s) - $(date -d "$OLDEST_BUILD" +%s)) / (60*60*24) ))"
+ local DISCLAIMER=""
if [ $DAY_DIFFS -lt $TIMESPAN_RAW ]; then
# this is a new architecture, there are fewer days to compare to.
- local DISCLAIMER=" <span style=\"font-size: 0.8em;\">(in the last $DAY_DIFFS days)</span>"
+ DISCLAIMER=" <span style=\"font-size: 0.8em;\">(in the last $DAY_DIFFS days)</span>"
TIMESPAN_RAW=$DAY_DIFF
fi
if [ $DAY_DIFFS -ge $MIN_DAYS ]; then
@@ -319,7 +320,7 @@ _average_builds_per_day() {
# very new arch with too few resulsts to care about stats
RESULT="&nbsp;"
fi
- write_page "<td>${RESULT}${DISCLAIMER:-}</td>"
+ write_page "<td>${RESULT}${DISCLAIMER}</td>"
done
write_page "</tr>"
}