IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 26, 2007, 11:57:00 AM (19 years ago)
Author:
Paul Price
Message:

Don't need --camera from the command line because it can come through the query.

File:
1 edited

Legend:

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

    r12051 r12056  
    3737GetOptions(
    3838    'diff_id|d=s'       => \$diff_id, # Diff identifier
    39     'camera|c=s'        => \$camera, # Camera name
    4039    'dbname|d=s'        => \$dbname, # Database name
    4140    'workdir|w=s'       => \$workdir,   # Working directory, for output files
     
    4645pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    4746pod2usage(
    48     -msg => "Required options: --diff_id --camera",
     47    -msg => "Required options: --diff_id",
    4948    -exitval => 3,
    50 ) unless defined $diff_id
    51     and defined $camera;
    52 
    53 $ipprc->define_camera($camera);
     49          ) unless defined $diff_id;
    5450
    5551# Look for programs we need
     
    8884my $template;                   # Template file
    8985my $skycell_id;                 # Skycell identifier
     86my $camera;                     # Camera
    9087foreach my $file (@$files) {
    9188    my $uri = $ipprc->convert_filename_absolute( $file->{uri} ); # URI for file
     
    10198        $skycell_id = $file->{skycell_id};
    10299    }
     100    if (defined $camera) {
     101        &my_die("Cameras don't match", $diff_id, $PS_EXIT_SYS_ERROR) unless $file->{camera} eq $camera;
     102    } else {
     103        $camera = $file->{camera};
     104    }
    103105}
    104106
    105107&my_die("Unable to identify template", $diff_id, $PS_EXIT_SYS_ERROR) unless defined $template;
    106108&my_die("Unable to identify input", $diff_id, $PS_EXIT_SYS_ERROR) unless defined $input;
     109$ipprc->define_camera($camera);
    107110
    108111### Working directory
Note: See TracChangeset for help on using the changeset viewer.