#!/usr/bin/perl -w # # Summarize the progress of make buildworld # # $dotat: buildworld/summary.pl,v 1.8 2002/07/03 15:54:26 fanf2 Exp $ use strict; use English; my $log = $ARGV[0] || "/root/buildworld/log"; $OUTPUT_AUTOFLUSH = 1; open LOG, "tail -f -n +0 $log |" or die "open tail -f $log |: $!\n"; my $section = ""; my $dots = 0; while () { if (/^================================/ or /^--------------------------------/ or /^>>> / or /^===> / or /^[a-z]+ing [A-Za-z0-9 ]*in /) { if ($dots) { print "\n"; $dots = 0; } if (/^>>> /) { $section = $_; $section =~ s/\n$/ /; } if (/^===> /) { print $section, $_; } else { print; } } else { print "."; $dots = 1; } }