- Timestamp:
- Jul 30, 2010, 9:31:50 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20100621/ippScripts/scripts/publish_file.pl
r28413 r28794 82 82 my $mdcParser = PS::IPP::Metadata::Config->new; 83 83 84 my $mops = ($product =~ /^IPP-MOPS/ ? 1 : 0); # Format for MOPS? 84 85 my ($dsFile, $dsFileName) = tempfile("/tmp/publish.$pub_id.ds.XXXX", UNLINK => !$save_temps ); 86 my $dsType = $mops ? "IPP-MOPS" : $product; # Type for DataStore 85 87 86 88 my $comment; # Comment for exposure … … 155 157 &my_die("Unable to parse metadata config", $pub_id, $PS_EXIT_PROG_ERROR); 156 158 157 my $mops = ($product =~ /^IPP-MOPS/ ? 1 : 0); # Format for MOPS?158 159 my ($mopsPositiveFile, $mopsPositiveFileName) = tempfile("/tmp/publish.$pub_id.mops.pos.XXXX", UNLINK => !$save_temps ) if $mops; 159 160 my ($mopsNegativeFile, $mopsNegativeFileName) = tempfile("/tmp/publish.$pub_id.mops.neg.XXXX", UNLINK => !$save_temps ) if $mops; … … 230 231 print $mopsNegativeFile "$filename\n"; 231 232 } else { 232 print $dsFile "$filename|||$ product|${skycell_id}.neg|\n";233 print $dsFile "$filename|||$dsType|${skycell_id}.neg|\n"; 233 234 } 234 235 } … … 241 242 if (scalar keys %positive > 0) { 242 243 my $output = mops_combine(\%positive, "$outroot.pos.mops", $mopsPositiveFileName); 243 print $dsFile "$output|||$ product|positive|\n";244 print $dsFile "$output|||$dsType|positive|\n"; 244 245 } 245 246 if (scalar keys %negative > 0) { 246 247 my $output = mops_combine(\%negative, "$outroot.neg.mops", $mopsNegativeFileName); 247 print $dsFile "$output|||$ product|negative|\n";248 print $dsFile "$output|||$dsType|negative|\n"; 248 249 } 249 250 } … … 253 254 254 255 unless ($no_update) { 255 my $command = "$dsreg --add pub.$pub_id.$stage.$stage_id --copy --abspath --product $product --type $ product--list $dsFileName";256 my $command = "$dsreg --add pub.$pub_id.$stage.$stage_id --copy --abspath --product $product --type $dsType --list $dsFileName"; 256 257 $command .= " --ps0 \"$comment\"" if defined $comment; 257 258
Note:
See TracChangeset
for help on using the changeset viewer.
