From 70dcaccc84712b62fd11a0f3bb2e32ff6081ba5e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Sun, 26 May 2013 16:38:29 +0200 Subject: [PATCH] Change .twiki extension of glued reports to .html. --- dashboard.pl | 2 +- matrixgen-cron.sh | 12 ++++++------ matrixgen.pl | 16 +++++++++++----- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/dashboard.pl b/dashboard.pl index c793a69..a0e25be 100755 --- a/dashboard.pl +++ b/dashboard.pl @@ -316,7 +316,7 @@ print qq( } print "\n"; foreach my $c (sort keys %components) { - print " Get Report\n"; + print " Get Report\n"; } print " \n"; print "\n\n"; diff --git a/matrixgen-cron.sh b/matrixgen-cron.sh index f4152c0..d727a94 100755 --- a/matrixgen-cron.sh +++ b/matrixgen-cron.sh @@ -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 {} \; diff --git a/matrixgen.pl b/matrixgen.pl index b478b35..ba983bd 100755 --- a/matrixgen.pl +++ b/matrixgen.pl @@ -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( ); foreach my $c (sort keys %components) { - print "report-$c.twiki "; + print "report-$c.html "; } print qq( Modified: $now -- 1.8.2.3