IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5223


Ignore:
Timestamp:
Oct 3, 2005, 3:52:07 PM (21 years ago)
Author:
desonia
Message:

added support for output directory specification.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/psParseErrorCodes

    r4541 r5223  
    88
    99my $data = "psErrorCodes.dat";
     10my $outdir = ".";
    1011
    1112# Assign variables based on the presence of command line options to the script
    1213GetOptions(
    1314    "data=s"  => \$data,
     15    "outdir=s" => \$outdir,
    1416    "verbose" => \$verbose,
    1517    "help"    => \$help
     
    5153
    5254foreach (@ARGV) {
    53     my $output = $_;
    54     my $filename = $output.".in";
     55    my $filename = $_.".in";
     56    m/\/?([\w\.]+)$/;
     57    my $output = "$outdir/$1";
    5558
    5659    die "Failed to open input file '$filename'"
     
    5962      if !open( OUTFILE, ">", $output );
    6063
    61     print "\nOutput File:\n" if $verbose;
     64    print "\nOutput File: $output\n" if $verbose;
    6265    while (<INFILE>) {
    6366        if (/\${ErrorCode}/ || /\${ErrorDescription}/ || /\${n}/) {
Note: See TracChangeset for help on using the changeset viewer.