IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17558


Ignore:
Timestamp:
May 7, 2008, 10:55:42 AM (18 years ago)
Author:
eugene
Message:

test for absolute path for workdir

File:
1 edited

Legend:

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

    r16639 r17558  
    5050
    5151my $pxinject = can_run('pxinject') or die "Can't find pxinject\n";
     52
     53# workdir needs to be an absolute path, or it must start with file://, path://, or neb://
     54if ($workdir) {
     55    my $valid = 0;
     56    $valid |= ($workdir =~ m|^file://|);
     57    $valid |= ($workdir =~ m|^path://|);
     58    $valid |= ($workdir =~ m|^neb://|);
     59    $valid |= ($workdir =~ m|^/|);
     60
     61    if (!$valid) {
     62        $workdir = File::Spec->rel2abs( $workdir );
     63        print "adjust workdir to $workdir\n";
     64    }
     65}
    5266
    5367# if workdir is not defined, assign the current path
Note: See TracChangeset for help on using the changeset viewer.