IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 25319


Ignore:
Timestamp:
Sep 10, 2009, 11:59:30 AM (17 years ago)
Author:
bills
Message:

check for missing tools earlier and die if not found

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/scripts/pstamp_parser_run.pl

    r25195 r25319  
    4747}
    4848
     49my $missing_tools;
     50
     51my $pstamptool  = can_run('pstamptool')  or (warn "Can't find pstamptool"  and $missing_tools = 1);
     52my $pstampparse = can_run('pstampparse.pl') or (warn "Can't find pstampparse.pl" and $missing_tools = 1);
     53my $dqueryparse = can_run('dqueryparse.pl') or (warn "Can't find dqueryparse.pl" and $missing_tools = 1);
     54my $dsget = can_run('dsget') or (warn "Can't find dsget" and $missing_tools = 1);
     55
     56if ($missing_tools) {
     57    warn("Can't find required tools.");
     58    exit ($PS_EXIT_CONFIG_ERROR);
     59}
     60
     61
    4962my_die("--req_id --uri --product are required", $req_id, $PS_EXIT_CONFIG_ERROR)
    5063    if !defined($req_id) or
     
    88101exit ($PS_EXIT_CONFIG_ERROR) unless defined $defaultDSProduct;
    89102   
    90 my $missing_tools;
    91 
    92 my $pstamptool  = can_run('pstamptool')  or (warn "Can't find pstamptool"  and $missing_tools = 1);
    93 my $pstampparse = can_run('pstampparse.pl') or (warn "Can't find pstampparse.pl" and $missing_tools = 1);
    94 my $dqueryparse = can_run('dqueryparse.pl') or (warn "Can't find dqueryparse.pl" and $missing_tools = 1);
    95 my $dsget = can_run('dsget') or (warn "Can't find dsget" and $missing_tools = 1);
    96 
    97 if ($missing_tools) {
    98     warn("Can't find required tools.");
    99     exit ($PS_EXIT_CONFIG_ERROR);
    100 }
    101 
    102103my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files
    103104
Note: See TracChangeset for help on using the changeset viewer.