IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28370


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

added a pretend option to camtool definebyquery

Location:
trunk/ippTools/src
Files:
2 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;
  • trunk/ippTools/src/camtoolConfig.c

    r28089 r28370  
    6565    psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-set_dist_group",     0, "define dist group", NULL);
    6666    psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-set_note",           0, "define note", NULL);
     67    psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-pretend",           0, "do not actual modify the database", false);
     68    psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-simple",            0, "use the simple output format", false);
    6769
    6870    // -updaterun
     
    8385    psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-set_dist_group", 0,   "define new dist_group", NULL);
    8486    psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-set_note", 0,         "define new note", NULL);
     87
    8588    // -pendingexp
    8689    psMetadata *pendingexpArgs = psMetadataAlloc();
Note: See TracChangeset for help on using the changeset viewer.