From 7745ba7928d7c757bcb241fac6da7a1fa75c969c Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Thu, 19 Jan 2017 13:53:53 +0100 Subject: reproducible debian: be sure to have an empty variable at the start of the loop... Signed-off-by: Holger Levsen --- bin/reproducible_html_dashboard.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bin') 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=" (in the last $DAY_DIFFS days)" + DISCLAIMER=" (in the last $DAY_DIFFS days)" 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=" " fi - write_page "${RESULT}${DISCLAIMER:-}" + write_page "${RESULT}${DISCLAIMER}" done write_page "" } -- cgit v1.2.3-70-g09d2