IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37345


Ignore:
Timestamp:
Sep 2, 2014, 3:38:20 PM (12 years ago)
Author:
watersc1
Message:

So many many typos and incorrect logic checks. This seems to work now, though.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-pv3-20140717/ippScripts/scripts/sc_mk_stack_mdc.pl

    r37342 r37345  
    3333    my $file = "";
    3434    my $error = 0;
     35
     36#   print "PB: $path_base\n";
     37
    3538    #header
    3639    $mdc_content .= "INPUT${counter}  METADATA\n";
     
    5558    $mdc_content .=  "   BKGMODEL        STR     ${path_base}.mdl.fits\n";
    5659    $mdc_content .=  "END\n\n";
    57 
     60#    print "MDC: $mdc_content\n";
    5861    # If we had no errors, print it and move on.
    59     if ($error != 0) {
     62    if ($error == 0) {
    6063        print $mdc_content;
    6164    }
     
    6568
    6669sub do_checks {
    67     my $file = shift(@ARGV);
    68     if (! ((-e $file)&&(-s $file))) { # This file does not exist or is zero size.
    69         $file = "${remote_root}/tmp/$component_map{$file}";
    70         if (! ((-e $file)&&(-s $file))) { # The other expected file did not exist.
    71             $file = '';
    72             die "Missing file!";
     70    my ($cfile,$error) = @_;
     71#    print  ">$cfile<\n";
     72    if (! ((-e $cfile)&&(-s $cfile))) { # This cfile does not exist or is zero size.
     73        my $disk = $component_map{$cfile};
     74        $cfile = "${remote_root}/tmp/${disk}";
     75        if (! ((-e $cfile)&&(-s $cfile))) { # The other expected cfile did not exist.
     76            $cfile = '';
     77            $error++;
     78            die "Missing cfile!";
    7379        }
    7480    }
    75     return($file);
     81    return($cfile);
    7682}
    7783   
Note: See TracChangeset for help on using the changeset viewer.