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
|
#!/usr/bin/perl -w
$checkinst = "/homes/pmr/check/bin/";
open (VERSION, "embossversion -full -auto|") || die "Unable to run embossversion";
while(<VERSION>) {
if(/^InstallDirectory:\s+(\S+)/) {
$embossinst = "$1/bin/";
}
}
close VERSION;
%ignore = ("emnu" => "stdin input",
"mse" => "stdin input",
"fretree" => "stdin input"
);
%count = ();
%unknownapps = ();
while (<>) {
if(/^[\#]/){
next;
}
else {
if(/^(\S+)/) {$app = $1}
else {$app = "qatest"}
if(defined($ignore{$app})) {next}
$num = ++$count{$app};
if(-e "$embossinst/$app") {
s/^(\S+) +/$1-qa$num = $1 /;
}
elsif (-e "$checkinst/$app") {
s/^(\S+) +/$1-qa$num =test= $1 /;
}
else {
if(!defined($unknownapps{$app})) {
print STDERR "Unknown application $app\n";
$unknownapps{$app}=0;
}
$unknownapps{$app}++;
}
s/[\[](-[^\]]+)[\]]//gos;
s/([ ,:\@])\.\.\/([^.])/$1..\/..\/qa\/$2/gos;
# s/([ ,:\@])\.\.\/\.\.\/([^.])/$1..\/$2/gos;
s/ / /gos;
}
s/ -auto Y//;
s/ -auto//;
s/$/ -auto/;
print;
}
foreach $a (sort(keys(%unknownapps))) {
print STDERR "Unknown $unknownapps{$a} times '$a'\n";
}
|