IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 16, 2010, 3:24:34 PM (16 years ago)
Author:
eugene
Message:

added a pretend option to camtool definebyquery

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/camtool.c

    r28339 r28370  
    130130    PXOPT_LOOKUP_STR(note, config->args, "-set_note", false, false);
    131131
     132    // default
     133    PXOPT_LOOKUP_BOOL(pretend, config->args, "-pretend", false);
     134    PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
     135
    132136    // find the exp_id of all the exposures that we want to queue up.
    133137    psString query = pxDataGet("camtool_find_chip_id.sql");
     
    161165    if (!psArrayLength(output)) {
    162166        psTrace("camtool", PS_LOG_INFO, "no rows found");
     167        psFree(output);
     168        return true;
     169    }
     170
     171    if (pretend) {
     172        // negative simple so the default is true
     173        if (!ippdbPrintMetadatas(stdout, output, "chipRun", !simple)) {
     174            psError(PS_ERR_UNKNOWN, false, "failed to print array");
     175            psFree(output);
     176            return false;
     177        }
    163178        psFree(output);
    164179        return true;
Note: See TracChangeset for help on using the changeset viewer.