IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32915 for trunk/ippScripts


Ignore:
Timestamp:
Dec 9, 2011, 9:50:58 AM (15 years ago)
Author:
bills
Message:

When reverting be slightly less paranoid. If the original file's basname doesn't
contain SR_ assume it's ok to revert even if the backup also says SR_
use $ipprc->redirect_to_logfile() to avoid dead instances

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/magic_destreak_revert.pl

    r32872 r32915  
    8686my $ipprc = PS::IPP::Config->new( $camera ) or my_die( "Unable to set up", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR ); # IPP configuration
    8787
    88 $ipprc->redirect_output($logfile) or my_die( "Unable to redirect output", $magic_ds_id, $component, $PS_EXIT_SYS_ERROR ) if $logfile;
     88$ipprc->redirect_to_logfile($logfile) or my_die( "Unable to redirect output", $magic_ds_id, $component, $PS_EXIT_SYS_ERROR ) if $logfile;
    8989
    9090&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));
     
    421421            # files are in their original state. Just delete back up file
    422422            # otherwise go to failed_revert for manual inspection.
    423             if (!($o_basename =~ /SR_/) and ($b_basename =~ /SR_/)) {
     423            # XXX: We probably can get by with just checking the basename of the original file
     424            if (!($o_basename =~ /SR_/) ) {
     425            # if (!($o_basename =~ /SR_/) and ($b_basename =~ /SR_/)) {
    424426                print STDERR " basenames are as expected it is safe to delete backup file\n";
    425427                if (! $ipprc->file_delete($backup, $force)) {
Note: See TracChangeset for help on using the changeset viewer.