Changeset 16308 for trunk/ippScripts/scripts/register_imfile.pl
- Timestamp:
- Feb 5, 2008, 11:47:19 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/register_imfile.pl (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/register_imfile.pl
r16196 r16308 37 37 use Pod::Usage qw( pod2usage ); 38 38 39 my ($cache, $exp_id, $tmp_class_id, $tmp_exp_name, $uri, $dbname, $ no_update, $no_op);39 my ($cache, $exp_id, $tmp_class_id, $tmp_exp_name, $uri, $dbname, $berbose, $no_update, $no_op); 40 40 GetOptions( 41 41 'caches' => \$cache, … … 45 45 'uri|u=s' => \$uri, 46 46 'dbname|d=s' => \$dbname,# Database name 47 'verbose' => \$verbose, # Print to stdout 47 48 'no-update' => \$no_update, 48 49 'no-op' => \$no_op, … … 130 131 131 132 my $now_time = localtime(); 132 printf STDERR "\nstarting ppStats: %s\n", $now_time ;133 printf STDERR "\nstarting ppStats: %s\n", $now_time if $verbose; 133 134 134 135 # Run ppStats on the input file … … 137 138 my $command = "$ppStats $uri -recipe PPSTATS $RECIPE -level"; # Command to run ppStats 138 139 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 139 cache_run(command => $command, verbose => 1);140 cache_run(command => $command, verbose => $verbose); 140 141 unless ($success) { 141 142 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 157 158 158 159 $now_time = localtime(); 159 printf STDERR "\ndone with ppStats: %s\n", $now_time ;160 printf STDERR "\ndone with ppStats: %s\n", $now_time if $verbose; 160 161 161 162 # we require at a minimum: -telescope, -inst, -filelevel, -class_id, -exp_type … … 175 176 176 177 $now_time = localtime(); 177 printf STDERR "\nrunning regtool update: %s\n", $now_time ;178 printf STDERR "\nrunning regtool update: %s\n", $now_time if $verbose; 178 179 179 180 # Push the results into the database 180 181 unless ($no_update) { 181 182 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 182 run(command => $command, verbose => 1);183 run(command => $command, verbose => $verbose); 183 184 unless ($success) { 184 185 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 191 192 192 193 $now_time = localtime(); 193 printf STDERR "\ndone with regtool update: %s\n", $now_time ;194 printf STDERR "\ndone with regtool update: %s\n", $now_time if $verbose; 194 195 195 196 sub cache_run
Note:
See TracChangeset
for help on using the changeset viewer.
