8 open (LOG, '<', "LOG");
9 open (LOG_HTML, '>', "log.html");
14 <link rel="stylesheet" href="build.css">
18 print LOG_HTML "<pre>";
23 if (open (VARS, "<", $file)) {
26 my ($key, $value) = /^([^=]+)=(.*)/ or next;
33 my (%vars) = read_vars ('VARS');
38 my ($result) = "failure";
45 print LOG_HTML "</pre><hr><pre>\n";
53 if (my ($name, $product) = /^Saving(?:([^:]*):)?\s+(.*)$/) {
54 my $href = "$product/index.html";
55 $href = $product if ! -e $href;
58 $p{NAME} = $name if defined ($name);
59 $p{PRODUCT} = $product;
62 push (@products, \%p);
63 push (@{$steps[$#steps]{CHILDREN}}, \%p);
70 $result = 'success' if $_ eq 'Success';
72 if (my ($diagnostic) = /(error|warning):/i) {
74 $d{DIAGNOSTIC} = lc ($diagnostic);
77 push (@{$steps[$#steps]{CHILDREN}}, \%d);
79 $log_class = "$diagnostic";
82 printf LOG_HTML "<a name=\"%d\"><tt>%4d</tt></a> ", $ln, $ln;
83 if (defined ($log_class)) {
84 print LOG_HTML "<span class=\"$log_class\">", encode_entities ($_), "</span>\n";
86 print LOG_HTML encode_entities ($_), "\n";
90 open (INDEX, '>','index.html');
95 <link rel="stylesheet" href="build.css">
100 print INDEX "<h1>Build ", $vars{"build_number"}, ": $result</h1>\n";
102 print INDEX "<h2>Build Properties</h2>\n";
103 print INDEX "<table>\n";
104 print INDEX "<tr><th>Name</th><th>Value</th></tr>\n";
105 foreach my $key (sort (keys (%vars))) {
107 print INDEX "<td>", encode_entities ($key), "</td>";
108 print INDEX "<td>", encode_entities ($vars{$key}), "</td>";
109 print INDEX "</tr>\n";
111 print INDEX "</table>\n";
113 print INDEX "<h2>Build Products</h2>\n";
114 print INDEX "<ul>\n";
115 foreach my $p (@products) {
117 print INDEX encode_entities ($p->{NAME}), ": " if defined ($p->{NAME});
118 print INDEX "<a href=\"", encode_entities ($p->{HREF}), "\">";
119 print INDEX encode_entities ($p->{PRODUCT});
120 print INDEX "</a></li>\n";
122 print INDEX "</ul>\n";
126 return "<small><a href=\"log.html#$ln\">(log)</a></small>";
129 print INDEX "<h2>Build Summary</h2>\n";
130 print INDEX "<ol>\n";
131 foreach my $s (@steps) {
132 print INDEX "<li>", encode_entities ($s->{TITLE});
133 print INDEX " ", log_link ($s->{LN});
134 foreach my $c (@{$s->{CHILDREN}}) {
135 if (defined ($c->{DIAGNOSTIC})) {
136 print INDEX "<p class=\"$c->{DIAGNOSTIC}\">";
137 print INDEX "<a href=\"log.html#$c->{LN}\">";
138 print INDEX encode_entities ($c->{MESSAGE});
139 print INDEX "</a></p>\n";
141 print INDEX "<p>→ <a href=\"", encode_entities ($c->{HREF}), "\">";
142 print INDEX encode_entities ($c->{PRODUCT});
144 print INDEX log_link ($c->{LN});
145 print INDEX "</p>\n";
148 print INDEX "</li>\n";
150 print INDEX "</ol>\n";
157 print LOG_HTML <<EOF;
163 open (CSS, '>', "build.css");
168 padding: 0em 3em 0em 3em;
172 margin: 0pt 0pt 0pt 0em
194 H1, H2, H3, H4, H5, H6 {
195 font-family: sans-serif;
204 text-decoration: none;
208 text-decoration: none;
212 text-decoration: none;
215 text-decoration: underline