Changeset 37345
- Timestamp:
- Sep 2, 2014, 3:38:20 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-pv3-20140717/ippScripts/scripts/sc_mk_stack_mdc.pl
r37342 r37345 33 33 my $file = ""; 34 34 my $error = 0; 35 36 # print "PB: $path_base\n"; 37 35 38 #header 36 39 $mdc_content .= "INPUT${counter} METADATA\n"; … … 55 58 $mdc_content .= " BKGMODEL STR ${path_base}.mdl.fits\n"; 56 59 $mdc_content .= "END\n\n"; 57 60 # print "MDC: $mdc_content\n"; 58 61 # If we had no errors, print it and move on. 59 if ($error != 0) {62 if ($error == 0) { 60 63 print $mdc_content; 61 64 } … … 65 68 66 69 sub 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!"; 73 79 } 74 80 } 75 return($ file);81 return($cfile); 76 82 } 77 83
Note:
See TracChangeset
for help on using the changeset viewer.
