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/detrend_process_imfile.pl

    r11297 r11298  
    1818use Pod::Usage qw( pod2usage );
    1919
    20 my ($det_id, $exp_tag, $class_id, $det_type, $input_uri, $camera, $bdname, $no_update);
     20my ($det_id, $exp_tag, $class_id, $det_type, $input_uri, $camera, $bdname, $workdir, $no_update);
    2121GetOptions(
    2222    'det_id|d=s'        => \$det_id,
     
    2727    'camera|c=s'        => \$camera,
    2828    'dbname|d=s'        => \$dbname, # Database name
     29    'workdir|w=s'       => \$workdir, # Working directory, for output files
    2930    'no-update'         => \$no_update
    3031) or pod2usage( 2 );
     
    6667
    6768### Output file name
    68 my ($vol, $dir, $file) = File::Spec->splitpath( $input_uri );
     69unless (defined $workdir) {
     70    my ($vol, $dir, $file) = File::Spec->splitpath( $input_uri );
     71    $workdir = $dir;
     72}
    6973my $outputRoot = $exp_tag . '.detproc.' . $det_id; # Root name
    70 $outputRoot = File::Spec->catpath( $vol, $dir, $outputRoot );
     74$outputRoot = File::Spec->catfile( $workdir, $outputRoot );
    7175$outputRoot = $ipprc->convert_filename_absolute( $outputRoot );
    7276$input_uri = $ipprc->convert_filename_absolute( $input_uri );
Note: See TracChangeset for help on using the changeset viewer.