Changeset 25896

Show
Ignore:
Timestamp:
04.07.2012 15:36:09 (7 years ago)
Author:
ak19
Message:

When doing incremental, don't want to be deleting building or moving it to index in activate.pl, but still need to do some activation for solr.

Location:
main/trunk/greenstone2/bin/script
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/activate.pl

    r25892 r25896  
    478478     
    479479    &print_task_msg("Running  Collection  Activation  Stage"); 
    480      
    481     # can't do anything without a build directory with something in it to move into index 
    482     if(!&util::dir_exists($build_dir)) { 
    483         &print_msg("No building folder at $build_dir to move to index.\n"); 
    484         exit -1; 
    485     } elsif (&util::is_dir_empty($build_dir)) { 
    486         &print_msg("Nothing in building folder $build_dir to move into index folder.\n"); 
    487         exit -1; 
    488     } 
    489      
     480     
    490481    # get and check the collection name 
    491482    if ((&colcfg::use_collection($site, $qualified_collection, $collect_dir)) eq "") { 
     
    523514    } else { 
    524515    $buildtype = "mg"; #mg is the default 
     516    }     
     517     
     518    # can't do anything without a build directory with something in it to move into index 
     519    # Except if we're (doing incremental) building for solr, where we want to still 
     520    # activate and deactivate collections including for the incremental case 
     521    if(!&util::dir_exists($build_dir)) { 
     522    &print_msg("No building folder at $build_dir to move to index.\n"); 
     523    exit -1 unless ($buildtype eq "solr"); #&& $incremental); 
     524    } elsif (&util::is_dir_empty($build_dir)) { 
     525    &print_msg("Nothing in building folder $build_dir to move into index folder.\n"); 
     526    exit -1 unless ($buildtype eq "solr"); #&& $incremental); 
    525527    } 
     528     
    526529 
    527530    my $solr_server; 
  • main/trunk/greenstone2/bin/script/buildcol.pl

    r25758 r25896  
    700700        push(@activate_argv,"-removeold") if($removeold); 
    701701        push(@activate_argv,"-keepold") if($keepold); 
     702        push(@activate_argv,"-incremental") if($incremental); 
    702703        my $quoted_argv = join(" ", map { "\"$_\"" } @activate_argv); 
    703704