From: Tomas Pospisek
Date: Fri, 23 Jan 2015 23:56:02 +0000 (+0100)
Subject: factor out common HTML header output into 'html_header' function
X-Git-Url: https://git.donarmstrong.com/?p=bugscan.git;a=commitdiff_plain;h=d6cd98414bdf357ff4c0869e09c5f4d984bec8f8
factor out common HTML header output into 'html_header' function
---
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