Changeset 30754
- Timestamp:
- Feb 24, 2011, 1:58:31 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/magic_destreak_revert.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/magic_destreak_revert.pl
r30693 r30754 78 78 defined $outroot; 79 79 80 &my_die("bytes and md5sum are is required for raw stage stage", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR) if ($stage eq 'raw' and (!$bytes or !$md5sum)); 80 if (defined($replace) and ($replace eq "T")) { 81 $replace = 1; 82 } else { 83 $replace = 0; 84 } 85 86 my $ipprc = PS::IPP::Config->new( $camera ) or my_die( "Unable to set up", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR ); # IPP configuration 87 88 $ipprc->redirect_output($logfile) or my_die( "Unable to redirect output", $magic_ds_id, $component, $PS_EXIT_SYS_ERROR ) if $logfile; 89 90 &my_die("bytes and md5sum are is required for raw stage stage", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR) if ($replace and $stage eq 'raw' and (!$bytes or !$md5sum)); 81 91 82 92 &my_die("cam_path_base is required for chip stage", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR) if ($stage eq 'chip' and !$cam_path_base); … … 84 94 85 95 86 my $ipprc = PS::IPP::Config->new( $camera ) or my_die( "Unable to set up", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR ); # IPP configuration87 88 $ipprc->redirect_output($logfile) or my_die( "Unable to redirect output", $magic_ds_id, $component, $PS_EXIT_SYS_ERROR ) if $logfile;89 96 90 97 $cam_reduction = 'DEFAULT' if !defined $cam_reduction or ($cam_reduction eq "NULL"); … … 118 125 my $basename = basename($path_base); 119 126 my $nebulousInput = inNebulous($dirname); 120 121 if (defined($replace) and ($replace eq "T")) {122 $replace = 1;123 } else {124 $replace = 0;125 }126 127 127 128 &my_die("replace not allowed for non-nebulous files", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR) … … 370 371 my $force = 1; # force deletion of backup files in nebulous 371 372 373 if (!$replace) { 374 # we don't need to do all of this checking unless the destreak run is 375 # replace mode just delete the backup 376 my $error_code = $ipprc->kill_file($backup); 377 if ($error_code) { 378 print STDERR "failed to kill $backup: error_code $error_code\n"; 379 return 0; 380 } else { 381 return 1; 382 } 383 } 384 372 385 my $o_path = $ipprc->file_resolve($original); 373 386 my $original_result;
Note:
See TracChangeset
for help on using the changeset viewer.
