IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 30, 2010, 9:31:50 AM (16 years ago)
Author:
eugene
Message:

updates from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20100621/ippScripts/scripts/publish_file.pl

    r28413 r28794  
    8282my $mdcParser = PS::IPP::Metadata::Config->new;
    8383
     84my $mops = ($product =~ /^IPP-MOPS/ ? 1 : 0); # Format for MOPS?
    8485my ($dsFile, $dsFileName) = tempfile("/tmp/publish.$pub_id.ds.XXXX", UNLINK => !$save_temps );
     86my $dsType = $mops ? "IPP-MOPS" : $product; # Type for DataStore
    8587
    8688my $comment;                    # Comment for exposure
     
    155157        &my_die("Unable to parse metadata config", $pub_id, $PS_EXIT_PROG_ERROR);
    156158
    157     my $mops = ($product =~ /^IPP-MOPS/ ? 1 : 0); # Format for MOPS?
    158159    my ($mopsPositiveFile, $mopsPositiveFileName) = tempfile("/tmp/publish.$pub_id.mops.pos.XXXX", UNLINK => !$save_temps ) if $mops;
    159160    my ($mopsNegativeFile, $mopsNegativeFileName) = tempfile("/tmp/publish.$pub_id.mops.neg.XXXX", UNLINK => !$save_temps ) if $mops;
     
    230231                print $mopsNegativeFile "$filename\n";
    231232            } else {
    232                 print $dsFile "$filename|||$product|${skycell_id}.neg|\n";
     233                print $dsFile "$filename|||$dsType|${skycell_id}.neg|\n";
    233234            }
    234235        }
     
    241242        if (scalar keys %positive > 0) {
    242243            my $output = mops_combine(\%positive, "$outroot.pos.mops", $mopsPositiveFileName);
    243             print $dsFile "$output|||$product|positive|\n";
     244            print $dsFile "$output|||$dsType|positive|\n";
    244245        }
    245246        if (scalar keys %negative > 0) {
    246247            my $output = mops_combine(\%negative, "$outroot.neg.mops", $mopsNegativeFileName);
    247             print $dsFile "$output|||$product|negative|\n";
     248            print $dsFile "$output|||$dsType|negative|\n";
    248249        }
    249250    }
     
    253254
    254255unless ($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";
    256257    $command .= " --ps0 \"$comment\"" if defined $comment;
    257258
Note: See TracChangeset for help on using the changeset viewer.