Changeset 784
- Timestamp:
- 1999-11-15T18:10:44+13:00 (24 years ago)
- Location:
- trunk/gsdl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/buildcol.pl
r783 r784 47 47 print STDERR " -builddir directory Where to put the built indexes\n"; 48 48 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"; 50 50 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"; 52 55 print STDERR " -allclassifications Don't remove empty classifications\n\n"; 53 56 } … … 57 60 { 58 61 my ($verbosity, $archivedir, $cachedir, $builddir, $maxdocs, 59 $debug, $mode, $indexname, $ allclassifications);62 $debug, $mode, $indexname, $keepold, $allclassifications); 60 63 if (!parsargv::parse(\@ARGV, 61 64 'verbosity/\d+/2', \$verbosity, … … 67 70 'mode/^(all|compress_text|build_index|infodb)$/all', \$mode, 68 71 'index/.*/', \$indexname, 72 'keepold', \$keepold, 69 73 'allclassifications', \$allclassifications)) { 70 74 &print_usage(); … … 145 149 eval("\$builder = new $buildertype(\$collection, " . 146 150 "\$realarchivedir, \$realbuilddir, \$verbosity, " . 147 "\$maxdocs, \$debug, \$ allclassifications)");151 "\$maxdocs, \$debug, \$keepold, \$allclassifications)"); 148 152 die "$@" if $@; 149 153 -
trunk/gsdl/perllib/mgbuilder.pm
r782 r784 47 47 48 48 sub 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) = @_; 51 51 52 52 # create an mgbuilder object … … 57 57 'maxdocs'=>$maxdocs, 58 58 'debug'=>$debug, 59 'keepold'=>$keepold, 59 60 'allclassifications'=>$allclassifications, 60 61 'notbuilt'=>[] # indexes not built … … 156 157 my $self = shift (@_); 157 158 158 if (!$self->{'debug'} ) {159 if (!$self->{'debug'} && !$self->{'keepold'}) { 159 160 # remove any old builds 160 161 &util::rm_r($self->{'build_dir'});
Note:
See TracChangeset
for help on using the changeset viewer.