IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35895


Ignore:
Timestamp:
Aug 6, 2013, 10:59:55 AM (13 years ago)
Author:
bills
Message:

add option to change the output directory

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/rundiffskycell.pl

    r33065 r35895  
    2525
    2626my $dbname = "gpc1";
    27 my ($diff_id, $skycell_id, $threads, $update, $no_redirect);
     27my ($diff_id, $skycell_id, $threads, $update, $no_redirect, $outdir);
    2828my $zaplog;
    2929
     
    3333    'threads=i'         => \$threads,
    3434    'no-redirect-output'  => \$no_redirect,
     35    'outdir=s'          => \$outdir,
    3536    'zaplog'            => \$zaplog,
    3637    'update'            => \$update,
     
    6465die "path_base not found\n" if !$path_base;
    6566die "diff_skyfile_id\n" if !$path_base;
     67
     68if ($outdir) {
     69    if ($outdir eq '.') {
     70        $outdir = $ENV{PWD};
     71    }
     72    my $base = basename($path_base);
     73    $path_base = "$outdir/$base";
     74}
    6675
    6776my $command = "diff_skycell.pl --diff_id $diff_id --skycell_id $skycell_id --diff_skyfile_id $diff_skyfile_id --outroot $path_base --run-state new";
Note: See TracChangeset for help on using the changeset viewer.