From 8b34af66652a8da5cf77a6d4eb01b326ab94f144 Mon Sep 17 00:00:00 2001 From: in2 Date: Thu, 3 Jul 2003 14:01:36 +0000 Subject: bug fix git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@1011 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- staticweb/manbuilder.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'staticweb/manbuilder.pl') diff --git a/staticweb/manbuilder.pl b/staticweb/manbuilder.pl index ed15d57e..a6020357 100755 --- a/staticweb/manbuilder.pl +++ b/staticweb/manbuilder.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: manbuilder.pl,v 1.6 2003/07/03 13:38:53 in2 Exp $ +# $Id: manbuilder.pl,v 1.7 2003/07/03 14:01:36 in2 Exp $ use lib '/home/bbs/bin/'; use strict; use OurNet::FuzzyIndex; @@ -21,7 +21,8 @@ sub main foreach( @ARGV ){ tie %db, 'DB_File', "$_.db", O_CREAT | O_RDWR, 0666, $DB_HASH; - $idx = OurNet::FuzzyIndex->new("$_.idx"); + $idx = OurNet::FuzzyIndex->new("$_.idx") + if( !$Getopt::Std::opt_n ); build("/home/bbs/man/boards/".substr($_, 0, 1)."/$_", ''); untie %db; } @@ -47,7 +48,8 @@ sub build($$) push @tdir, ["$doffset/$fn", $db{"title-$doffset/$fn"} = $bfh{"$_.title"}]; my $c = $bfh{"$_.content"}; - $idx->insert("$doffset/$fn", $bfh{"$_.title"}. "\n$c"); + $idx->insert("$doffset/$fn", $bfh{"$_.title"}. "\n$c") + if( !$Getopt::Std::opt_n ); $db{"$doffset/$fn"} = $c; } } -- cgit v1.2.3