From: František Dvořák Date: Fri, 9 Mar 2012 19:24:13 +0000 (+0100) Subject: Automatic generating of dashboard. X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=efb0f6b12a56fa9ee041db4c048c512b7f1f1664;p=meta-dashboard.git Automatic generating of dashboard. --- diff --git a/dashboard.pl b/dashboard.pl index 0b2f688..d92bc50 100755 --- a/dashboard.pl +++ b/dashboard.pl @@ -148,6 +148,7 @@ foreach my $s (keys %list) { # ==== glue reports ==== +if (0) { foreach my $c (sort keys %components) { my $cmd; @@ -165,6 +166,7 @@ foreach my $c (sort keys %components) { `cat /tmp/report-$c-install.twiki.part /tmp/report-$c-upgrade.twiki.part > /tmp/report-$c.twiki 2>/dev/null`; `rm -f /tmp/report-$c-*.twiki.part`; } +} # ==== matrix ==== diff --git a/matrixgen-cron.sh b/matrixgen-cron.sh index 908ce23..c6b05c0 100755 --- a/matrixgen-cron.sh +++ b/matrixgen-cron.sh @@ -3,18 +3,25 @@ for dir in `ls -1 | grep -v '\.'`; do if test $dir = 'RAW'; then continue; fi (cd $dir; ../matrixgen.pl > matrix.html.$$ - egrep -v -- 'Modified: ' matrix.html.$$ > new.$$ - egrep -v -- 'Modified: ' matrix.html > old.$$ 2>/dev/null - if ! cmp old.$$ new.$$ >/dev/null; then - mv matrix.html.$$ matrix.html - rm -f ./report-*.twiki - mv /tmp/report-*.twiki . - chown apache:users matrix.html report-*.twiki - /sbin/restorecon matrix.html report-*.twiki - fi - rm -f old.$$ new.$$ matrix.html.$$ /tmp/report-*.twiki + ../dashboard.pl > dashboard.html.$$ + for page in matrix dashboard; do + egrep -v -- 'Modified: ' $page.html.$$ > new.$$ + egrep -v -- 'Modified: ' $page.html > old.$$ 2>/dev/null + 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 $page.html report-*.twiki + /sbin/restorecon report-*.twiki + fi + /sbin/restorecon $page.html + fi + done + rm -f old.$$ new.$$ matrix.html.$$ dashboard.$$ /tmp/report-*.twiki ) 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 find ./RAW -mtime +7 -exec rm -f {} \;