Changeset 27256 for trunk/ippScripts/scripts/magic_destreak_cleanup.pl
- Timestamp:
- Mar 11, 2010, 3:53:13 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/magic_destreak_cleanup.pl
r27221 r27256 36 36 37 37 # Parse the command-line arguments 38 my ($magic_ds_id, $camera );38 my ($magic_ds_id, $camera, $force); 39 39 my ($dbname, $save_temps, $verbose, $no_update, $no_op, $logfile); 40 40 … … 42 42 'magic_ds_id=s' => \$magic_ds_id,# Magic destreak run identifier 43 43 'camera=s' => \$camera, # camera for evaluating file rules 44 'force' => \$force, # force deletion 44 45 'save-temps' => \$save_temps, # Save temporary files? 45 46 'dbname=s' => \$dbname, # Database name … … 104 105 my $cam_path_base = $run->{cam_path_base}; 105 106 my $inverse = $run->{inverse}; 107 my $replace = $run->{re_place}; 106 108 107 109 108 110 &my_die("unexpected run state found: $state", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) if $state ne "goto_cleaned"; 109 &my_die("clean not allowed for raw stage, use goto_restore", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) if $stage eq "raw";111 &my_die("clean not allowed for raw stage, use goto_restore", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) if ($stage eq "raw"); # XXX: add this once we implement and $replace; 110 112 111 113 … … 126 128 # we use the mask output from the camera stage for input and replace 127 129 # the output of the chip stage with that mask as well. 128 my $cammask = $ ipprc->filename("PSASTRO.OUTPUT.MASK", $cam_path_base, $component);130 my $cammask = $cam_path_base ? $ipprc->filename("PSASTRO.OUTPUT.MASK", $cam_path_base, $component) : undef; 129 131 130 132 if ($backup_path_base) { … … 141 143 } 142 144 143 $bmask = dirname($backup_path_base) . "/" . $prefix . basename($cammask) ;145 $bmask = dirname($backup_path_base) . "/" . $prefix . basename($cammask) if $cammask; 144 146 } 145 147 if ($recovery_path_base) { … … 148 150 $rweight = $ipprc->filename("PPIMAGE.CHIP.VARIANCE", $recovery_path_base, $component); 149 151 # This is kludgey but correct 150 $rmask = dirname($recovery_path_base) . "/" . basename($cammask) ;152 $rmask = dirname($recovery_path_base) . "/" . basename($cammask) if $cammask;; 151 153 } 152 154 } elsif ($stage eq "camera") { … … 226 228 if (!$no_update) { 227 229 print STDERR "deleting $file\n" if $verbose; 228 $ipprc->file_delete($file, 1) or my_die("Failed to delete $file", $magic_ds_id, $PS_EXIT_UNKNOWN_ERROR);229 } else {230 $ipprc->file_delete($file, $force) or my_die("Failed to delete $file", $magic_ds_id, $PS_EXIT_UNKNOWN_ERROR); 231 } else { 230 232 print STDERR "skipping delete $file\n"; 231 233 }
Note:
See TracChangeset
for help on using the changeset viewer.
