1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
|
#!/usr/bin/perl -w
@validfile = ("000todo.txt", "acdvalid.txt", "acdvalidreport.txt",
"myall.csh", "myalltest.csh",
"myconfig.csh", "mydoc.csh", "myembassyall.csh",
"myembassyconfig.csh", "myefunc.csh", "myacdvalid.csh",
"src-embassy", "summary.log", "x"
);
@validbase = ( "aclocal.m4", "autom4te.cache",
"config.cache", "config.log", "config.status",
"configure", "configure.lineno", "libtool", "so_locations",
"Makefile", "Makefile.in", "jembossctl"
);
%knownfile = ();
%knownbase = ();
%progs = ();
foreach $x (@validfile) { $knownfile{$x} = 1 }
foreach $x (@validbase) { $knownbase{$x} = 1 }
open (VERS, "embossversion -full -auto|") || die "Cannot run embossversion";
while (<VERS>) {
# if(/InstallDirectory: +(\S+)/) {$installdir = $1}
if(/BaseDirectory: +(\S+)/) {$basedir = $1}
}
close VERS;
open (PROGS, "wossname -alpha -auto|") || die "Cannot run wossname";
while (<PROGS>) {
if(/^([a-z]\S+)\s+(\S+)/) { $progs{$1} = $2; }
}
close PROGS;
$check = 0;
open (CHECK, "$basedir/emboss/Makefile.am") || die "Cannot open emboss/Makefile.am";
while (<CHECK>) {
if (/^check_PROGRAMS/) {$check = 1;}
if ($check) {
if (!/\S/) {$check = 0;}
}
if (!$check) {next}
foreach $x (split) {
if ($x eq "check_PROGRAMS") {next}
if ($x eq "=") {next}
if ($x eq "\\") {next}
# print "x: $x\n";
$progs{$x} = "check";
}
}
close CHECK;
$check = 0;
open (CHECK, "$basedir/embassy/myembossdemo/src/Makefile.am") ||
die "Cannot open embassy/myembossdemo/src/Makefile.am";
while (<CHECK>) {
if (/^check_PROGRAMS/) {$check = 1;}
if ($check) {
if (!/\S/) {$check = 0;}
}
if (!$check) {next}
foreach $x (split) {
if ($x eq "check_PROGRAMS") {next}
if ($x eq "=") {next}
if ($x eq "\\") {next}
# print "x: $x\n";
$progs{$x} = "check";
}
}
close CHECK;
# Process the input file (cvs update output)
# Look for lines that start with '?'
# check for files that could reasonably be there
# report everything else as a directory (d) or file.
while (<>) {
if (!/^[?] (\S+)/) {next}
$file = $1;
if($file =~ /[\/]([^\/]+)$/) { $base = $1 }
else { $base = $file }
# print "$file '$base'\n";
if(defined($knownfile{$file})) {next}
if(defined($knownbase{$base})) {next}
if ($file =~ /[.]o$/) {next}
if ($file =~ /^test\/qa\/\S+/) {
if (-d "$basedir/$file") {next}
}
if ($base =~ /^Makefile$/) {next}
if ($base =~ /^Makefile[.]in$/) {next}
if ($base =~ /^000notes$/) {next}
if ($base =~ /^emboss\/data\/000notes$/) {next}
if ($base =~ /^[.]deps$/) {next}
if ($base =~ /^[.]libs$/) {next}
if ($base =~ /[.]lo$/) {next}
if ($base =~ /[.]la$/) {next}
if ($file =~ /^test\/memtest\/output\/([^\/]+)$/) {next}
if ($file =~ /^test\/memtest\/valgrind\/([^\/]+)$/) {next}
if ($file =~ /^test\/memtest\/valgrind.err/) {next}
if ($file =~ /^test\/memtest\/valgrind.out/) {next}
if ($file =~ /^test\/memtest\/valgrindqa.err/) {next}
if ($file =~ /^test\/memtest\/valgrindqa.out/) {next}
if ($file =~ /^test\/memtest\/valgrind.result/) {next}
if ($file =~ /^test\/memtest\/valgrind.summary/) {next}
if ($file =~ /^test\/memtest\/valgrind.txt/) {next}
if ($file =~ /^test\/qa\/qatest.log/) {next}
if ($file =~ /^test\/qa\/qatest.doclog/) {next}
if ($file =~ /^test\/qa\/qatest.out/) {next}
if ($file =~ /^test\/qa\/qatest.summary/) {next}
if ($file =~ /^test\/qa\/qatestcmd.dat/) {next}
if ($file =~ /^emboss\/([^\/]+)$/) {
if(defined($progs{$1})) {next}
}
if ($file =~ /^embassy\/[^\/]+\/src\/([^\/]+)$/) {
if(defined($progs{$base})) {next}
}
# if ($file =~ /^embassy\/[^\/]+\/source\/([^\/]+)$/) {
# if(defined($progs{$base})) {next}
# }
# print "$file '$base'\n";
if (-d "$basedir/$file") {
print "d $file\n";
next;
}
print;
}
|