Changeset 13067


Ignore:
Timestamp:
2006-10-10T15:25:35+13:00 (18 years ago)
Author:
kjdon
Message:

if we are appending, and a lucene collection, then set builddir to be index dir, not building dir

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/bin/script/build

    r12003 r13067  
    394394    if ($append) {
    395395    $import_cmd .= " -keepold";
     396    if (not $manifest) {
     397        # if we are appending, with no manifest, assume incremental
     398        $import_cmd .= " -incremental";
     399    }
    396400    } else {
    397401    $import_cmd .= " -removeold";
     
    431435    if ($append) {
    432436    if ($indextype eq "lucene") {
    433         $build_cmd .= " -keepold";
     437        $build_cmd .= " -keepold -incremental -builddir $indexdir";
    434438        $removeold = 0;
    435439    }
     
    449453    &append_file ($out, "$outfile.build");
    450454
    451     if (-e &util::filename_cat ($buildingdir, "text", "$collection.ldb") ||
    452     -e &util::filename_cat ($buildingdir, "text", "$collection.bdb")) {
     455    if (($removeold && (-e &util::filename_cat ($buildingdir, "text", "$collection.ldb") || -e &util::filename_cat ($buildingdir, "text", "$collection.bdb"))) ||
     456    ($removeold == 0 && (-e &util::filename_cat ($indexdir, "text", "$collection.ldb") || -e &util::filename_cat ($indexdir, "text", "$collection.bdb")))) {
    453457    print $out "$collection collection built successfully\n\n";
    454458    if ($remove_archives) {
     
    474478    }
    475479    else {
    476     # Do nothing.  Assume index is symbolic link to building
    477     }
    478 
    479     # remove the cached arhives
     480    # Do nothing. We have built into index dir rather than building dir
     481    }
     482
     483    # remove the cached archives
    480484    if ($save_archives && -d "${archivedir}.org") {
    481485    &util::rm_r ("${archivedir}.org");
Note: See TracChangeset for help on using the changeset viewer.