IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 31, 2016, 6:35:55 AM (10 years ago)
Author:
eugene
Message:

allow non-neb file to not be replicated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/detrend_norm_apply.pl

    r33704 r39505  
    173173
    174174    # replicate output file
    175     $ipprc->replicate_file($output) or &my_die("failed to replicate: $output\n", $det_id,$iter,$class_id,$PS_EXIT_SYS_ERROR);
     175    my $scheme = file_scheme ($output);
     176    if ($scheme eq "neb") {
     177        $ipprc->replicate_file($output) or &my_die("failed to replicate: $output\n", $det_id,$iter,$class_id,$PS_EXIT_SYS_ERROR);
     178    } else {
     179        print "output $output is a file or path, not a nebulous key: skipping replication\n";
     180    }
    176181}
    177182
     
    223228}
    224229
     230# Return the scheme used for a filename (copied from PS-IPP-Config/lib/PS/IPP/Config.pm
     231sub file_scheme
     232{
     233    my $name = shift;                # Filename for which to get the scheme
     234    my ($scheme) = $name =~ /^(path|neb|file):/; # The scheme, e.g., file://, path://
     235    # $scheme may be undef if the input doesn't contain one of the above recognised schemes
     236    unless (defined($scheme)) { $scheme = "none"; }
     237    return $scheme;
     238}
    225239
    226240END {
Note: See TracChangeset for help on using the changeset viewer.