Changeset 22430 for trunk/ippScripts/scripts/chip_imfile.pl
- Timestamp:
- Feb 24, 2009, 12:00:25 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/chip_imfile.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/chip_imfile.pl
r21371 r22430 25 25 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt ); 26 26 use Pod::Usage qw( pod2usage ); 27 28 # Look for programs we need 29 my $missing_tools; 30 my $chiptool = can_run('chiptool') or (warn "Can't find chiptool" and $missing_tools = 1); 31 my $ppImage = can_run('ppImage') or (warn "Can't find ppImage" and $missing_tools = 1); 32 my $ppConfigDump = can_run('ppConfigDump') or (warn "Can't find ppConfigDump" and $missing_tools = 1); 33 my $ppStatsFromMetadata = can_run('ppStatsFromMetadata') or (warn "Can't find ppStatsFromMetadata" and $missing_tools = 1); 34 if ($missing_tools) { 35 warn("Can't find required tools."); 36 exit($PS_EXIT_CONFIG_ERROR); 37 } 27 38 28 39 # Parse the command-line arguments … … 53 64 defined $chip_id and 54 65 defined $class_id and 55 defined $chip_imfile_id and 66 defined $chip_imfile_id and 56 67 defined $uri and 57 68 defined $camera and 58 69 defined $outroot and 59 70 defined $run_state; 71 72 # Unhandled exceptions should be passed on to my_die so they get pushed into the database 73 $SIG{__DIE__} = sub { die @_ if $^S; 74 my_die( $_[0], $exp_id, $chip_id, $class_id, $PS_EXIT_UNKNOWN_ERROR ); }; 60 75 61 76 $ipprc->define_camera($camera); … … 69 84 print STDOUT "Starting script $0 on $host\n\n"; 70 85 print STDOUT "COMMAND IS: @ARGV\n\n"; 71 }72 73 # Look for programs we need74 my $missing_tools;75 my $chiptool = can_run('chiptool') or (warn "Can't find chiptool" and $missing_tools = 1);76 my $ppImage = can_run('ppImage') or (warn "Can't find ppImage" and $missing_tools = 1);77 my $ppConfigDump = can_run('ppConfigDump') or (warn "Can't find ppConfigDump" and $missing_tools = 1);78 my $ppStatsFromMetadata = can_run('ppStatsFromMetadata') or (warn "Can't find ppStatsFromMetadata" and $missing_tools = 1);79 if ($missing_tools) {80 warn("Can't find required tools.");81 exit($PS_EXIT_CONFIG_ERROR);82 86 } 83 87 … … 132 136 $command .= " -threads $threads" if defined $threads; 133 137 $command .= " -dbname $dbname" if defined $dbname; 134 $command .= " -image_id $chip_imfile_id" if defined $chip_imfile_id;135 $command .= " -source_id $source_id" if defined $source_id;138 $command .= " -image_id $chip_imfile_id" if defined $chip_imfile_id; 139 $command .= " -source_id $source_id" if defined $source_id; 136 140 $command .= " -dumpconfig $configuration"; 137 141 $command .= " -tracedest $traceDest -log $logDest"; … … 142 146 $command .= " -threads $threads" if defined $threads; 143 147 $command .= " -dbname $dbname" if defined $dbname; 144 $command .= " -image_id $chip_imfile_id" if defined $chip_imfile_id;145 $command .= " -source_id $source_id" if defined $source_id;148 $command .= " -image_id $chip_imfile_id" if defined $chip_imfile_id; 149 $command .= " -source_id $source_id" if defined $source_id; 146 150 $command .= " -tracedest $traceDest -log $logDest"; 147 151 $command .= " -Db PPIMAGE:PHOTOM FALSE";
Note:
See TracChangeset
for help on using the changeset viewer.
