IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 28, 2008, 4:32:51 PM (18 years ago)
Author:
Paul Price
Message:

Provide script outroot instead of workdir.

File:
1 edited

Legend:

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

    r16336 r16745  
    2727my ($dbname,                    # Database name to use
    2828    $verbose,                   # Verbose operations?
     29    $workdir_global,            # Global working directory
    2930    $no_op,                     # No operations?
    3031    $no_update,                 # No updating?
     
    3334           'dbname=s' => \$dbname,
    3435           'verbose' => \$verbose,
     36           'workdir' => \$workdir_global,
    3537           'no-op' => \$no_op,
    3638           'no-update' => \$no_update,
     
    7375        my $workdir = $item->{workdir};
    7476       
    75         my $command = "$diff_skycell --diff_id $diff_id --dbname $dbname";
     77        $workdir = $workdir_global unless defined $workdir and $workdir ne "NULL";
     78        die "No working directory specified.\n" unless defined $workdir;
     79       
     80        my $outroot = caturi( $workdir, "tess_$tess_id", $skycell_id, "$tess_id.$skycell_id.diff.$diff_id" );
     81
     82        my $command = "$diff_skycell --diff_id $diff_id --dbname $dbname --outroot $outroot";
    7683        $command .= " --verbose" if defined $verbose;
    7784        $command .= " --no-op" if defined $no_op;
    7885        $command .= " --no-update" if defined $no_update;
    79         $command .= " --workdir $workdir" if defined $workdir;
    8086        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    8187            run( command => $command, verbose => 1 );
    82 ###     die "Unable to do difference for $diff_id: $error_code\n" if not $success;
     88        die "Unable to do difference for $diff_id: $error_code\n" if not $success;
    8389    }
    8490}
Note: See TracChangeset for help on using the changeset viewer.