Changeset 29561 for trunk/ippScripts/scripts/magic_destreak.pl
- Timestamp:
- Oct 26, 2010, 8:39:32 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/magic_destreak.pl (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/magic_destreak.pl
r29495 r29561 42 42 # Parse the command-line arguments 43 43 my ($magic_ds_id, $camera, $streaks, $inv_streaks, $exp_id, $stage, $stage_id, $component, $uri, $path_base, $cam_path_base, $cam_reduction); 44 my ($streaks_path_base, $inv_streaks_path_base );44 my ($streaks_path_base, $inv_streaks_path_base, $run_state); 45 45 my ($outroot, $recoveryroot, $magicked); 46 46 my ($replace, $release); … … 50 50 'magic_ds_id=s' => \$magic_ds_id,# Magic destreak run identifier 51 51 'camera=s' => \$camera, # camera for evaluating file rules 52 'run-state=s' => \$run_state, # state of run (new or update) 52 53 'streaks_path_base=s' => \$streaks_path_base, # path_base for streaks data 53 54 'inv_streaks_path_base=s' => \$inv_streaks_path_base, #path_base for streaks from inverse diff … … 77 78 78 79 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 79 pod2usage( -msg => "Required options: --magic_ds_id --camera -- streaks --stage --stage_id --component --uri --path_base --outroot --magicked",80 pod2usage( -msg => "Required options: --magic_ds_id --camera --run_state --streaks --stage --stage_id --component --uri --path_base --outroot --magicked", 80 81 -exitval => 3) unless 81 82 defined $magic_ds_id and 82 83 defined $camera and 84 defined $run_state and 83 85 defined $streaks and 84 86 defined $streaks_path_base and … … 113 115 &my_die("Invalid value for stage: $stage", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 114 116 } 117 118 &my_die("Invalid value for run-state: $run_state", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR) 119 unless ($run_state eq 'new') or ($run_state eq 'update'); 120 115 121 $inv_streaks_path_base = undef if defined($inv_streaks_path_base) and ($inv_streaks_path_base eq "NULL"); 116 122 $inv_streaks = undef if defined($inv_streaks) and ($inv_streaks eq "NULL"); … … 479 485 # Input result into database 480 486 { 481 my $command = "$magicdstool -adddestreakedfile";487 my $command = "$magicdstool"; 482 488 $command .= " -magic_ds_id $magic_ds_id"; 483 489 $command .= " -component $component"; 484 490 $command .= " -setmagicked" if $replace; 485 $command .= " -backup_path_base $backup_path_base" if $backup_path_base; 486 $command .= " -recovery_path_base $recovery_path_base" if $recovery_path_base; 487 $command .= " $statsFlags" if $statsFlags; 491 if ($run_state eq 'new') { 492 $command .= " -adddestreakedfile"; 493 $command .= " -backup_path_base $backup_path_base" if $backup_path_base; 494 $command .= " -recovery_path_base $recovery_path_base" if $recovery_path_base; 495 $command .= " $statsFlags" if $statsFlags; 496 } else { 497 $command .= " -tofullfile"; 498 } 488 499 $command .= " -dbname $dbname" if defined $dbname; 489 500 … … 581 592 $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code; 582 593 583 my $command = "$magicdstool -adddestreakedfile"; 594 my $command = "$magicdstool"; 595 596 if ($run_state eq 'new') { 597 $command .= " -adddestreakedfile"; 598 } else { 599 $command .= " -updatedestreakedfile"; 600 } 584 601 $command .= " -magic_ds_id $magic_ds_id"; 585 602 $command .= " -component $component";
Note:
See TracChangeset
for help on using the changeset viewer.
