Change .twiki extension of glued reports to .html.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Sun, 26 May 2013 14:38:29 +0000 (16:38 +0200)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Sun, 26 May 2013 14:38:29 +0000 (16:38 +0200)
dashboard.pl
matrixgen-cron.sh
matrixgen.pl

index c793a69..a0e25be 100755 (executable)
@@ -316,7 +316,7 @@ print qq(<?xml version="1.0" encoding="UTF-8"?>
        }
        print "<tr class=\"overallreps\"><td class=\"overallreps\"></td>\n";
        foreach my $c (sort keys %components) {
-               print "         <td class=\"overallreps\" colspan=\"$colsforeach\">Get <a href=\"report-$c.twiki\" type=\"text/html\"><b>Report</b></a></td>\n";
+               print "         <td class=\"overallreps\" colspan=\"$colsforeach\">Get <a href=\"report-$c.html\" type=\"text/html\"><b>Report</b></a></td>\n";
        }
        print " </tr>\n";
        print "</table>\n\n";
index f4152c0..d727a94 100755 (executable)
@@ -10,21 +10,21 @@ for dir in `ls -1 | grep -v '\.'`; do
                if ! cmp old.$$ new.$$ >/dev/null; then
                        mv $page.html.$$ $page.html
                        if test $page = 'matrix'; then
-                               rm -f ./report-*.twiki
-                               mv /tmp/report-*.twiki .
-                               chown apache:users report-*.twiki
-                               /sbin/restorecon report-*.twiki
+                               rm -f ./report-*.html
+                               cp -p /tmp/report-*.html .
+                               chown apache:users report-*.html
+                               /sbin/restorecon report-*.html
                        fi
                        chown apache:users $page.html
                        /sbin/restorecon $page.html
                fi
         done
-        rm -f old.$$ new.$$ matrix.html.$$ dashboard.html.$$ /tmp/report-*.twiki
+        rm -f old.$$ new.$$ matrix.html.$$ dashboard.html.$$ /tmp/report-*.html
         )
 done
 ./matrixgen.pl > matrix.html.$$;chown apache:users matrix.html.$$; mv matrix.html.$$ matrix.html
 ./dashboard.pl > dashboard.html.$$;chown apache:users dashboard.html.$$; mv dashboard.html.$$ dashboard.html
-rm -f /tmp/report-*.twiki
+rm -f /tmp/report-*.html
 find ./RAW -mtime +7 -exec rm -f {} \;
 find ./RAW -type f \! -name \*.bz2 -exec bzip2 --best {} \;
 find . -mtime +30 -name report.twiki -exec bzip2 --best {} \;
index b478b35..ba983bd 100755 (executable)
@@ -181,14 +181,20 @@ foreach my $c (sort keys %components) {
                        for my $p (sort keys %{$list{$s}{$c}}) {
                                $item = $list{$s}{$c}{$p};
                                if (exists $item->{result} and $item->{result} eq "0") {
-                                       $cmd = "cat $item->{dir}/report.twiki >> /tmp/report-$c-$s.twiki.part";
-                                       `$cmd`;
+                                       if (-f "$item->{dir}/report.twiki") {
+                                               $cmd = "cat $item->{dir}/report.twiki >> /tmp/report-$c-$s.part";
+                                               `$cmd`;
+                                       }
+                                       if (-f "$item->{dir}/report.html") {
+                                               $cmd = "cat $item->{dir}/report.html >> /tmp/report-$c-$s.part";
+                                               `$cmd`;
+                                       }
                                }
                        }
                }
        }
-       `cat /tmp/report-$c-install.twiki.part /tmp/report-$c-minor-upgrade.twiki.part /tmp/report-$c-major-upgrade.twiki.part /tmp/report-$c-double-upgrade.twiki.part /tmp/report-$c-update.twiki.part > /tmp/report-$c.twiki 2>/dev/null`;
-       `rm -f /tmp/report-$c-*.twiki.part`;
+       `cat /tmp/report-$c-install.part /tmp/report-$c-minor-upgrade.part /tmp/report-$c-major-upgrade.part /tmp/report-$c-double-upgrade.part /tmp/report-$c-update.part > /tmp/report-$c.html 2>/dev/null`;
+       `rm -f /tmp/report-$c-*.part`;
 }
 
 
@@ -229,7 +235,7 @@ print qq(<?xml version="1.0" encoding="UTF-8"?>
                                <tr>
                                        <td class="reports">);
 foreach my $c (sort keys %components) {
-       print "<a href=\"report-$c.twiki\">report-$c.twiki</a> ";
+       print "<a href=\"report-$c.html\">report-$c.html</a> ";
 }
 print qq(</td>
                                        <td class="modified">Modified: $now</td>