Changeset 30489 for trunk/ippScripts/scripts/dist_advancerun.pl
- Timestamp:
- Feb 3, 2011, 2:51:02 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/dist_advancerun.pl (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/dist_advancerun.pl
r28963 r30489 23 23 use PS::IPP::Config 1.01 qw( :standard ); 24 24 25 my $ipprc = PS::IPP::Config->new(); # IPP configuration26 25 27 26 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt ); … … 29 28 30 29 # Parse the command-line arguments 31 my ($dist_id, $stage, $stage_id, $outdir, $clean );30 my ($dist_id, $stage, $stage_id, $outdir, $clean, $camera); 32 31 my ($dbname, $save_temps, $verbose, $no_update, $no_op, $logfile); 33 32 34 33 GetOptions( 35 'dist_id=s' => \$dist_id,# Magic destreak run identifier 34 'dist_id=s' => \$dist_id,# Magic destreak run identifier 35 'camera=s' => \$camera, 36 36 'stage=s' => \$stage, # raw, chip, warp, or diff 37 37 'stage_id=s' => \$stage_id, # exp_id, chip_id, warp_id, or diff_id … … 53 53 defined $stage_id and 54 54 defined $outdir; 55 56 my $ipprc = PS::IPP::Config->new($camera); # IPP configuration 55 57 56 58 $ipprc->redirect_output($logfile) if $logfile; … … 134 136 } 135 137 136 # XXX should we create a file rule for this? 137 my $dbinfo_file = "$outdir/dbinfo.$stage.$stage_id.mdc"; 138 139 { 140 my $command = "$tool_cmd $exportarg -outfile $dbinfo_file"; 138 139 # work around the fact that $ipprc->file_create does not actually create a file on disk 140 # unless the scheme is nebulous 141 sub create_file { 142 my $rule = shift; 143 my $path_base = shift; 144 my $ref = shift; 145 146 my $file; 147 148 my $error; 149 $file = $ipprc->prepare_output($rule, $path_base, undef, 1, \$error) 150 or &my_die("Unable to prepare outut for $rule", $dist_id, $PS_EXIT_SYS_ERROR); 151 152 my $scheme = file_scheme($file); 153 $scheme = "" if !$scheme; 154 155 my $resolved; 156 if ($scheme) { 157 $ipprc->file_create($file) 158 or &my_die("Unable to create $file", $dist_id, $PS_EXIT_SYS_ERROR); 159 160 $resolved = $ipprc->file_resolve($file) 161 or &my_die("Unable to resolve $file", $dist_id, $PS_EXIT_SYS_ERROR); 162 163 if ($scheme eq 'neb') { 164 &my_die("$resolved not found", $dist_id, $PS_EXIT_SYS_ERROR) unless ($resolved and -e $resolved); 165 } 166 } else { 167 $resolved = $file; 168 } 169 $$ref = $resolved; 170 171 return $file 172 } 173 174 my $dbinfo_root = "$outdir/dbinfo.$stage.$stage_id"; 175 my $resolved; 176 my $dbinfo_file = create_file("DIST.OUTPUT.DBINFO", $dbinfo_root, \$resolved); 177 178 { 179 my $command = "$tool_cmd $exportarg -outfile $resolved"; 141 180 $command .= " -clean" if ((defined $clean) and ($stage ne "raw")); 142 181 $command .= " -dbname $dbname" if defined $dbname; … … 149 188 } 150 189 } 151 my $dirinfo = "$outdir/dirinfo.$stage.$stage_id.mdc"; 190 191 my $dirinfo_root = "$outdir/dirinfo.$stage.$stage_id"; 192 my $dirinfo = create_file("DIST.OUTPUT.DIRINFO", $dirinfo_root, \$resolved); 193 152 194 { 153 195 my $command = "$tool_cmd $list_mode"; … … 168 210 &my_die("Unable to parse metadata list", $dist_id, $PS_EXIT_UNKNOWN_ERROR); 169 211 170 open MANIFEST, ">$ dirinfo" or171 &my_die("Unable to open dirinfo file $ dirinfo", $dist_id, $PS_EXIT_UNKNOWN_ERROR);212 open MANIFEST, ">$resolved" or 213 &my_die("Unable to open dirinfo file $resolved", $dist_id, $PS_EXIT_UNKNOWN_ERROR); 172 214 173 215 my $destdir; … … 197 239 &my_die("unable to find path", $dist_id, $PS_EXIT_UNKNOWN_ERROR) if !$path; 198 240 my $component_dir = find_componentdir($destdir, $path); 199 # print MANIFEST "$component METADATA\n";200 241 print MANIFEST "\t" , "$component", "\tSTR\t", $component_dir, "\n"; 201 242 } … … 217 258 } 218 259 } 219 220 260 221 261 exit 0;
Note:
See TracChangeset
for help on using the changeset viewer.
