Ignore:
Timestamp:
2012-05-11T19:23:42+12:00 (12 years ago)
Author:
ak19
Message:
  1. Introduced the verbosity flag into activate.pl to print out debugging statements depending on verbosity, and this is passed in from buildcol.pl and full-rebuild.pl too now. 2. Cleaned up some debugging code.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/full-rebuild.pl

    r25573 r25579  
    3131# Followed by: full-buildcol.pl -removeold ...
    3232# (assumming import.pl did not end with an error)
    33 
    34 # The -keepold argument can be passed into this script since this calls activate.pl
    35 # And activate.pl allows the contents of a src dir to be moved into the dest_dir
    36 # without destroying other (uniquely-named) contents of dest_dir.
    3733
    3834BEGIN {
     
    129125    my $build_dir   = undef;
    130126    my $index_dir   = undef;
     127    my $verbosity   = 2; # same as the default in buildcol.pl
    131128
    132129    while (my $arg = shift @argv) {
     
    160157        push(@activate_argv,$arg,$index_dir);
    161158    }
     159    elsif ($arg eq "-verbosity") {     
     160        $verbosity = shift @argv;
     161        push(@import_argv,$arg,$verbosity);
     162        push(@buildcol_argv,$arg,$verbosity);
     163        push(@activate_argv,$arg,$verbosity);
     164    }
    162165    else {
    163166        push(@import_argv,$arg);
    164167        push(@buildcol_argv,$arg);
    165         push(@activate_argv,$arg);
     168        push(@activate_argv,$arg);
    166169    }
    167170    }
     
    198201
    199202        #full_replace($site,$collect_dir,$collect,$build_dir,$index_dir);
    200         my $activatecol_cmd = $launch_cmd . "activate.pl $quoted_activate_argv \"$collect\"";
     203       
     204        # run activate with -removeold, just like full-buildcol.pl called above runs buildcol.pl
     205        my $activatecol_cmd = $launch_cmd . "activate.pl -removeold $quoted_activate_argv \"$collect\"";
    201206        my $activatecol_status = system($activatecol_cmd)/256;
    202207    }
Note: See TracChangeset for help on using the changeset viewer.