Changeset 22430 for trunk/ippScripts/scripts/detrend_process_imfile.pl
- Timestamp:
- Feb 24, 2009, 12:00:25 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/detrend_process_imfile.pl
r19942 r22430 22 22 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt ); 23 23 use Pod::Usage qw( pod2usage ); 24 25 # Look for programs we need 26 my $missing_tools; 27 my $dettool = can_run('dettool') or (warn "Can't find dettool" and $missing_tools = 1); 28 my $ppImage = can_run('ppImage') or (warn "Can't find ppImage" and $missing_tools = 1); 29 my $ppStatsFromMetadata = can_run('ppStatsFromMetadata') or (warn "Can't find ppStatsFromMetadata" and $missing_tools = 1); 30 if ($missing_tools) { 31 warn("Can't find required tools."); 32 exit($PS_EXIT_CONFIG_ERROR); 33 } 24 34 25 35 my ( $det_id, $exp_id, $class_id, $det_type, $exp_tag, $input_uri, $camera, $outroot, $dbname, $reduction, … … 55 65 defined $outroot; 56 66 67 # Unhandled exceptions should be passed on to my_die so they get pushed into the database 68 $SIG{__DIE__} = sub { die @_ if $^S; 69 my_die( $_[0], $det_id, $exp_id, $class_id, $PS_EXIT_UNKNOWN_ERROR ); }; 70 57 71 # XXX this exits with status = 0 on failure 58 72 $ipprc->define_camera($camera); … … 66 80 my $ppimage_recipe = $ipprc->reduction($reduction, uc($det_type) . '_PROCESS'); # Recipe name for ppImage 67 81 my $jpeg_recipe = $ipprc->reduction($reduction, uc($det_type) . '_JPEG_IMAGE'); # Recipe name for JPEG 68 69 # Look for programs we need70 my $missing_tools;71 my $dettool = can_run('dettool') or (warn "Can't find dettool" and $missing_tools = 1);72 my $ppImage = can_run('ppImage') or (warn "Can't find ppImage" and $missing_tools = 1);73 my $ppStatsFromMetadata = can_run('ppStatsFromMetadata') or (warn "Can't find ppStatsFromMetadata" and $missing_tools = 1);74 if ($missing_tools) {75 warn("Can't find required tools.");76 exit($PS_EXIT_CONFIG_ERROR);77 }78 82 79 83 &my_die("Couldn't find input file: $input_uri\n", $det_id, $exp_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($input_uri); … … 128 132 } 129 133 foreach my $line (@$stdout_buf) { 130 $cmdflags .= " $line";134 $cmdflags .= " $line"; 131 135 } 132 136 chomp $cmdflags;
Note:
See TracChangeset
for help on using the changeset viewer.
