]> git.donarmstrong.com Git - bugscan.git/blobdiff - dohtml
factor out common HTML header output into 'html_header' function
[bugscan.git] / dohtml
diff --git a/dohtml b/dohtml
index 39b7889f22000c2f26c55b5afe771b1872a9ed5f..d3a8bd17b45bd8ba49058b6035c57f11c4561359 100755 (executable)
--- 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 <<EOF
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <title>$title, $date</title>
+  </head>
+<body bgcolor="white">
+<h1 align="center">$title</h1>
+
+<h2 align="center">$date</h2>
+
+EOF
+}
+
 realmakepage() {
        local   filter="$1"     # Distributions to list
        local   title="$2"      # Title of page
@@ -18,20 +37,13 @@ realmakepage() {
 
        filter="$filter $worry"
 
-       cat <<EOF
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-    <title>$title, $date</title>
-  </head>
-<body bgcolor="white">
-<h1 align="center">$title</h1>
+       header "$title" "$date"
 
-<h2 align="center">$date</h2>
+       cat <<EOF
 
 <p align="center">for distribution(s): $descr</p>
 
+<p align="center">You might also want to check out <a href="http://udd.debian.org/bugs/">UDD</a> instead of this page.</p>
 <hr>
 
 <p>
@@ -75,17 +87,10 @@ EOF
 }
 
 makemainpage() {
-       cat <<EOF
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-    <title>$title, $time</title>
-  </head>
-<body bgcolor="white">
-<h1 align="center">$title</h1>
 
-<h2 align="center">$time</h2>
+       header "$title" "$date"
+
+       cat <<EOF
 
 <p align="center">
 EOF
@@ -165,6 +170,7 @@ makepage "debian/source" "$title" $htmldir/debian/source.html "$time"
 makepage "" "$title" $htmldir/other/all.html "$time"
 makepage "" "$title" "$htmldir/other/stable.html" "$time" "-b"
 makepage "" "$title" "$htmldir/other/testing.html" "$time" "-t"
+makepage "" "$title" "$htmldir/other/pseudo.html" "$time" "pseudo"
 
 makemainpage > $htmldir/index.html.new
 mv -f $htmldir/index.html.new $htmldir/index.html