From d6cd98414bdf357ff4c0869e09c5f4d984bec8f8 Mon Sep 17 00:00:00 2001 From: Tomas Pospisek Date: Sat, 24 Jan 2015 00:56:02 +0100 Subject: [PATCH] factor out common HTML header output into 'html_header' function --- dohtml | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/dohtml b/dohtml index 62eea00..d3a8bd1 100755 --- a/dohtml +++ b/dohtml @@ -2,6 +2,25 @@ htmldir=/org/bugs.debian.org/www/bugscan +header() { + local title="$1" # Title of page + local date="$2" # Date + + cat < + + + + $title, $date + + +

$title

+ +

$date

+ +EOF +} + realmakepage() { local filter="$1" # Distributions to list local title="$2" # Title of page @@ -18,17 +37,9 @@ realmakepage() { filter="$filter $worry" - cat < - - - - $title, $date - - -

$title

+ header "$title" "$date" -

$date

+ cat <for distribution(s): $descr

@@ -76,17 +87,10 @@ EOF } makemainpage() { - cat < - - - - $title, $time - - -

$title

-

$time

+ header "$title" "$date" + + cat < EOF -- 2.39.2