summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-07-03 21:38:53 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-07-03 21:38:53 +0800
commit07b372e069e5fb4f33825837096754517a861e28 (patch)
treed305d2d97b10b609e5d55226c66f876f21be3044
parent25b2baf237dd90fb054927646f15e63f5e0b6980 (diff)
downloadpttbbs-07b372e069e5fb4f33825837096754517a861e28.tar
pttbbs-07b372e069e5fb4f33825837096754517a861e28.tar.gz
pttbbs-07b372e069e5fb4f33825837096754517a861e28.tar.bz2
pttbbs-07b372e069e5fb4f33825837096754517a861e28.tar.lz
pttbbs-07b372e069e5fb4f33825837096754517a861e28.tar.xz
pttbbs-07b372e069e5fb4f33825837096754517a861e28.tar.zst
pttbbs-07b372e069e5fb4f33825837096754517a861e28.zip
bug fix, -n
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@1009 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rwxr-xr-xstaticweb/manbuilder.pl9
1 files changed, 5 insertions, 4 deletions
diff --git a/staticweb/manbuilder.pl b/staticweb/manbuilder.pl
index e7a0f46e..ed15d57e 100755
--- a/staticweb/manbuilder.pl
+++ b/staticweb/manbuilder.pl
@@ -1,5 +1,5 @@
#!/usr/bin/perl
-# $Id: manbuilder.pl,v 1.5 2003/07/03 13:06:56 in2 Exp $
+# $Id: manbuilder.pl,v 1.6 2003/07/03 13:38:53 in2 Exp $
use lib '/home/bbs/bin/';
use strict;
use OurNet::FuzzyIndex;
@@ -12,7 +12,7 @@ my(%db, $idx, $serial);
sub main
{
- die usage() unless( @ARGV );
+ die usage() unless( getopts('n') || !@ARGV );
$serial = Data::Serializer->new(serializer => 'Storable',
digester => 'MD5',
@@ -45,7 +45,7 @@ sub build($$)
}
else{
push @tdir, ["$doffset/$fn",
- $db{"title-$doffset/$fn/"} = $bfh{"$_.title"}];
+ $db{"title-$doffset/$fn"} = $bfh{"$_.title"}];
my $c = $bfh{"$_.content"};
$idx->insert("$doffset/$fn", $bfh{"$_.title"}. "\n$c");
$db{"$doffset/$fn"} = $c;
@@ -56,7 +56,8 @@ sub build($$)
sub usage
{
- print ("$0 boardname ...\n");
+ print ("$0 [-n] boardname ...\n".
+ "\t -n for .db only (no .idx)\n");
exit(0);
}