IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 14, 2023, 3:08:37 PM (3 years ago)
Author:
eugene
Message:

more work on the rawfix scripts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/eam/rawfix.20230221/src/check_md5s_dateobs.pl

    r42404 r42411  
    1818my @instlist = glob ("$dateword/*.inst.txt");
    1919my @md5slist = glob ("$dateword/*.md5s.txt");
     20
     21my $Nfail = 0;
    2022
    2123foreach my $instfile (@instlist) {
     
    3941
    4042    if ($md5match eq "NONE") {
    41         print STDERR "missing md5sum file for $instfile\n";
     43        print STDOUT "missing md5sum file for $instfile\n";
     44        $Nfail ++;
    4245        next;
    4346    }
     
    5760    my $N2 = @instdata;
    5861    if ($N1 != $N2) {
    59         print STDERR "inconsistent number of lines in $md5match : $N1 vs $N2\n";
     62        print STDOUT "inconsistent number of lines in $md5match : $N1 vs $N2\n";
     63        $Nfail ++;
    6064        next;
    6165    }
     
    7680
    7781        if ($md5tru ne $md5obs) {
    78             print STDERR "FAIL: $inst $state $md5tru $md5obs\n";
     82            print STDOUT "FAIL: $inst $state $md5tru $md5obs\n";
     83            $Nfail ++;
    7984        }
    8085    }
     86}
     87
     88if ($Nfail) {
     89    print STDOUT "ERROR: $Nfail errors\n";
     90    exit 1;
     91} else {
     92    print STDOUT "SUCCESS: $Nfail errors\n";
     93    exit 0;
    8194}
    8295
Note: See TracChangeset for help on using the changeset viewer.