2009-09-17 17:48:36 +08:00
|
|
|
#!/usr/bin/perl #
|
|
|
|
# ------------- #
|
|
|
|
my $level = 0;
|
|
|
|
my $path = "";
|
|
|
|
my $ofile = "";
|
|
|
|
while(<STDIN>) {
|
|
|
|
if (/Entering directory `(.*)'/) {
|
|
|
|
$path = $1;
|
|
|
|
if ($level>0) {
|
|
|
|
print " |"x$level;
|
|
|
|
@str=split('/', $1);
|
|
|
|
print "- ".$str[$#str]."\n";
|
|
|
|
}
|
|
|
|
$level++;
|
|
|
|
}
|
|
|
|
--$level if (/Leaving directory `(.*)'/);
|
|
|
|
s/warning:/\x1b[32mwarning\x1b[0m:/;
|
|
|
|
s/error:/\x1b[31merror\x1b[0m:/;
|
|
|
|
if (/\..:/) {
|
|
|
|
s/:/\n\t/;
|
|
|
|
/(.*):/;
|
|
|
|
$file = $1;
|
2010-02-23 07:26:13 +08:00
|
|
|
print "$path/$_" if ($file ne $ofile);
|
2009-09-17 17:48:36 +08:00
|
|
|
$ofile = $file;
|
|
|
|
}
|
|
|
|
#{ print "$path/".$line; }
|
|
|
|
}
|