IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 25, 2007, 3:15:46 PM (19 years ago)
Author:
Paul Price
Message:

Adding -workdir to all scripts.

File:
1 edited

Legend:

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

    r11297 r11298  
    2222    $input,                     # Input FITS file
    2323    $camera,                    # Camera
    24     $outpath,                   # Outpath
    2524    $dbname,                    # Database name
     25    $workdir,                   # Working directory, for output files
    2626    $no_update                  # Don't update the database?
    2727    );
     
    3131    'uri|u=s'       => \$input,
    3232    'camera|c=s'    => \$camera,
    33     'outpath|o=s'   => \$outpath,
    3433    'dbname|d=s'    => \$dbname, # Database name
     34    'workdir|w=s'   => \$workdir,
    3535    'no-update'     => \$no_update
    3636) or pod2usage( 2 );
     
    4343    and defined $classId
    4444    and defined $input
    45     and defined $outpath
    4645    and defined $camera;
    4746
     
    5453die "Can't find required tools.\n" if $missing_tools;
    5554
    56 # XXX old verion Output file name
    57 # XXX old version (drop) : my ($vol, $dir, $file) = File::Spec->splitpath( $input );
     55unless (defined $workdir) {
     56    my ($vol, $dir, $file) = File::Spec->splitpath( $input );
     57    $workdir = $dir;
     58}
    5859
    5960### Output file name --- must match camera configuration!
    6061my $outputRoot =  $expTag . '.p2';
    61 $outputRoot = File::Spec->catpath( $outpath, $outputRoot );
     62$outputRoot = File::Spec->catfile( $workdir, $outputRoot );
    6263$outputRoot = $ipprc->convert_filename_absolute($outputRoot);
    6364$input = $ipprc->convert_filename_absolute ( $input );
Note: See TracChangeset for help on using the changeset viewer.