IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 10, 2010, 4:16:03 PM (16 years ago)
Author:
eugene
Message:

updates from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20091201/ippScripts/scripts/ipp_image_path.pl

    r25207 r26873  
    1919use PS::IPP::Metadata::Config;
    2020use PS::IPP::Config 1.01 qw( :standard );
     21use Nebulous::Client;
    2122
    2223use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
    2324use Pod::Usage qw( pod2usage );
    2425
    25 my ($exp_name, $class_id, $from_registered, $dbname, $verbose);
     26my ($exp_name, $class_id, $from_registered, $dbname, $verbose, $alternate);
    2627
    2728GetOptions(
     
    3132    'dbname|d=s'    => \$dbname, # Database name   
    3233    'verbose'       => \$verbose,   # Print to stdout
     34    'alternate'     => \$alternate,
    3335) or pod2usage( 2 );
    3436
     
    99101                $path = resolve_ipp008_file($uri);
    100102            } elsif ($use_017_workaround && ($uri =~ /4683/) &&
    101                     ($uri =~ /ipp017/)) {
     103                     ($uri =~ /ipp017/)) {
    102104                $path = resolve_ipp017_file($uri);
    103             } else {
     105            } elsif ($alternate) {
     106                my $neb = $ipprc->nebulous();
     107                my $uris = $neb->find_instances($uri,'any');
     108                my @files = map {URI->new($_)->file if $_} @$uris;
     109
     110                if ($#files > 0) {
     111                    $path = $files[1];
     112                }
     113                else {
     114                    $path = $files[0];
     115                }
     116
     117            }
     118            else {
    104119                $path = $ipprc->file_resolve($uri);
    105120            }
Note: See TracChangeset for help on using the changeset viewer.