From c410b183370609b58db5d8d94c527bddb3c79447 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 25 Apr 2016 13:33:06 -0500 Subject: board_status/to-wiki: Fix background color of very recent test results Test results under 16 days old display with an incorrect background color due to the leading zero not being preset in the associated HTML color code. Add the leading zero where needed to generate a valid HTML color code. Change-Id: I0dfe29ec1afc409a4908073922ac31a4091f0f1f Signed-off-by: Timothy Pearson Reviewed-on: https://review.coreboot.org/14514 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- util/board_status/to-wiki/towiki.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util/board_status/to-wiki/towiki.sh b/util/board_status/to-wiki/towiki.sh index d9ec06495a..3fec3860f8 100755 --- a/util/board_status/to-wiki/towiki.sh +++ b/util/board_status/to-wiki/towiki.sh @@ -427,6 +427,9 @@ EOF fi fi lastgood_diff_hex=$(echo "obase=16; $lastgood_diff" | bc) + if [ "$lastgood_diff" -lt 16 ]; then + lastgood_diff_hex="0${lastgood_diff_hex}" + fi cell_bgcolor="#${lastgood_diff_hex}ff00" echo "| style=\"background:${cell_bgcolor}\" | [[#$vendor/$board|$lastgood]]" fi -- cgit v1.2.3