IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 28, 2010, 1:34:21 PM (16 years ago)
Author:
bills
Message:

make -exportchip work

File:
1 edited

Legend:

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

    r28502 r28737  
    311311    pxAddLabelSearchArgs(config,   where, "-label",              "chipRun.label",         "==");
    312312
    313     if (!psListLength(where->list) && !psMetadataLookupBool(NULL, config->args, "-all")) {
     313    if (!psListLength(where->list)) {
    314314        psFree(where);
    315315        psError(PXTOOLS_ERR_CONFIG, true, "search parameters are required");
     
    325325    PXOPT_LOOKUP_STR(note, config->args, "-set_note", false, false);
    326326    PXOPT_LOOKUP_TIME(registered, config->args, "-registered", false, false);
     327    PXOPT_LOOKUP_BOOL(destreaked, config->args, "-destreaked", false);
    327328    PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
    328329    PXOPT_LOOKUP_BOOL(pretend, config->args, "-pretend", false);
     
    343344    }
    344345    psFree(where);
     346
     347    if (destreaked) {
     348        psStringAppend(&query, " AND chipRun.magicked > 0");
     349    }
    345350
    346351    if (!rerun) {
     
    361366            psStringAppend(&query,
    362367                           "\nAND (chipBackgroundRun.dist_group = '%s'"
    363                            " OR chipBackgroundRun.dist_group IS NULL",
     368                           " OR chipBackgroundRun.dist_group IS NULL)",
    364369                           dist_group);
    365370        }
     
    479484    }
    480485
    481     psString query = psStringCopy("UPDATE chipBackgroundRun JOIN chipBackgroundImfile USING(chip_bg_id)");
     486    psString query = psStringCopy("UPDATE chipBackgroundRun");
    482487    bool result = pxUpdateRun(config, where, &query, "chipBackgroundRun", "chip_bg_id",
    483488                              "chipBackgroundImfile", true);
     
    10861091    }
    10871092
     1093    PXOPT_LOOKUP_BOOL(destreaked, config->args, "-destreaked", false);
    10881094    PXOPT_LOOKUP_BOOL(rerun, config->args, "-rerun", false);
    10891095    PXOPT_LOOKUP_STR(workdir, config->args, "-set_workdir", false, false);
     
    11121118    }
    11131119    psFree(where);
     1120
     1121    if (destreaked) {
     1122        psStringAppend(&query, " AND warpRun.magicked > 0");
     1123    }
    11141124
    11151125    if (!rerun) {
Note: See TracChangeset for help on using the changeset viewer.