Changeset 22430 for trunk/ippScripts/scripts/magic_mask.pl
- Timestamp:
- Feb 24, 2009, 12:00:25 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/magic_mask.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/magic_mask.pl
r20673 r22430 28 28 use Pod::Usage qw( pod2usage ); 29 29 30 # Look for programs we need 31 my $missing_tools; 32 my $magictool = can_run('magictool') or (warn "Can't find magictool" and $missing_tools = 1); 33 my $streaksremove = can_run('streaksremove') or (warn "Can't find streaksremove" and $missing_tools = 1); 34 if ($missing_tools) { 35 warn("Can't find required tools."); 36 exit($PS_EXIT_CONFIG_ERROR); 37 } 38 30 39 # Parse the command-line arguments 31 40 my ($magic_id, $camera, $dbname, $outroot, $save_temps, $verbose, $no_update, $no_op, $logfile); … … 49 58 defined $outroot; 50 59 60 # Unhandled exceptions should be passed on to my_die so they get pushed into the database 61 $SIG{__DIE__} = sub { die @_ if $^S; 62 my_die( $_[0], $magic_id, $PS_EXIT_UNKNOWN_ERROR ); }; 63 51 64 $ipprc->define_camera($camera); 52 65 53 66 $ipprc->redirect_output($logfile) if $logfile; 54 55 # Look for programs we need56 my $missing_tools;57 my $magictool = can_run('magictool') or (warn "Can't find magictool" and $missing_tools = 1);58 my $streaksremove = can_run('streaksremove') or (warn "Can't find streaksremove" and $missing_tools = 1);59 if ($missing_tools) {60 warn("Can't find required tools.");61 exit($PS_EXIT_CONFIG_ERROR);62 }63 67 64 68 my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files … … 85 89 ### Do the heavy lifting 86 90 { 87 my $command = "$streaks --streaks"; # Command to execute91 my $command = "$streaksremove --streaks"; # Command to execute 88 92 my @basenames; # List of base names 89 93
Note:
See TracChangeset
for help on using the changeset viewer.
