Changeset 313 for trunk/gsdl/bin


Ignore:
Timestamp:
1999-06-30T15:30:10+12:00 (25 years ago)
Author:
sjboddie
Message:

added maxdocs and allclassifications command line options

File:
1 edited

Legend:

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

    r223 r313  
    2222    print STDERR "   -archivedir directory Where the archives live\n";
    2323    print STDERR "   -cachedir directory   Where to cache the archives\n";
    24     print STDERR "   -builddir directory   Where to put the built indexes\n\n";
     24    print STDERR "   -builddir directory   Where to put the built indexes\n";
     25    print STDERR "   -maxdocs number       Maximum number of documents to build\n";
     26    print STDERR "   -allclassifications   Don't remove empty classifications\n\n";
    2527}
    2628
     
    2931{
    3032    if (!parsargv::parse(\@ARGV,
    31              'newgdbm', \$newgdbm,
    3233             'verbosity/\d+/2', \$verbosity,
    3334             'archivedir/.*/', \$archivedir,
    3435             'cachedir/.*/', \$cachedir,
    35              'builddir/.*/', \$builddir)) {
     36             'builddir/.*/', \$builddir,
     37             'maxdocs/\d+/', \$maxdocs,
     38             'allclassifications', \$allclassifications)) {
    3639    &print_usage();
    3740    die "\n";
    3841    }
    39 
    40     $newgdbm = 0 unless $newgdbm;
    4142
    4243    # get and check the collection
     
    4546    die "\n";
    4647    }
     48
     49    # only here to prevent a perl warning
     50    $maxdocs = "" if $maxdocs !~ /\d/;
     51    $allclassifications = 0 unless $allclassifications == 1;
    4752
    4853    # read the configuration file
     
    112117
    113118    eval("\$builder = new $buildertype(\$collection, " .
    114      "\$realarchivedir, \$realbuilddir, \$verbosity, \$newgdbm)");
     119     "\$realarchivedir, \$realbuilddir, \$verbosity, " .
     120     "\$maxdocs, \$allclassifications)");
    115121    die "$@" if $@;
    116122
Note: See TracChangeset for help on using the changeset viewer.