Changeset 784


Ignore:
Timestamp:
1999-11-15T18:10:44+13:00 (24 years ago)
Author:
sjboddie
Message:

added -keepold option

Location:
trunk/gsdl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/bin/script/buildcol.pl

    r783 r784  
    4747    print STDERR "   -builddir directory   Where to put the built indexes\n";
    4848    print STDERR "   -maxdocs number       Maximum number of documents to build\n";
    49     print STDERR "   -debug                print output to STDOUT\n";
     49    print STDERR "   -debug                Print output to STDOUT\n";
    5050    print STDERR "   -mode all|compress_text|build_index|infodb\n";
    51     print STDERR "   -index indexname      index to build (will build all in config file if not set)\n";
     51    print STDERR "   -index indexname      Index to build (will build all in\n";
     52    print STDERR "                         config file if not set)\n";
     53    print STDERR "   -keepold              will not destroy the current contents of the\n";
     54    print STDERR "                         building directory\n";
    5255    print STDERR "   -allclassifications   Don't remove empty classifications\n\n";
    5356}
     
    5760{
    5861    my ($verbosity, $archivedir, $cachedir, $builddir, $maxdocs,
    59     $debug, $mode, $indexname, $allclassifications);
     62    $debug, $mode, $indexname, $keepold, $allclassifications);
    6063    if (!parsargv::parse(\@ARGV,
    6164             'verbosity/\d+/2', \$verbosity,
     
    6770             'mode/^(all|compress_text|build_index|infodb)$/all', \$mode,
    6871             'index/.*/', \$indexname,
     72             'keepold', \$keepold,
    6973             'allclassifications', \$allclassifications)) {
    7074    &print_usage();
     
    145149    eval("\$builder = new $buildertype(\$collection, " .
    146150     "\$realarchivedir, \$realbuilddir, \$verbosity, " .
    147      "\$maxdocs, \$debug, \$allclassifications)");
     151     "\$maxdocs, \$debug, \$keepold, \$allclassifications)");
    148152    die "$@" if $@;
    149153
  • trunk/gsdl/perllib/mgbuilder.pm

    r782 r784  
    4747
    4848sub new {
    49     my ($class, $collection, $source_dir, $build_dir,
    50     $verbosity, $maxdocs, $debug, $allclassifications) = @_;
     49    my ($class, $collection, $source_dir, $build_dir, $verbosity,
     50    $maxdocs, $debug, $keepold, $allclassifications) = @_;
    5151
    5252    # create an mgbuilder object
     
    5757              'maxdocs'=>$maxdocs,
    5858              'debug'=>$debug,
     59              'keepold'=>$keepold,
    5960              'allclassifications'=>$allclassifications,
    6061              'notbuilt'=>[]    # indexes not built
     
    156157    my $self = shift (@_);
    157158
    158     if (!$self->{'debug'}) {
     159    if (!$self->{'debug'} && !$self->{'keepold'}) {
    159160    # remove any old builds
    160161    &util::rm_r($self->{'build_dir'});
Note: See TracChangeset for help on using the changeset viewer.