summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-12-16 14:33:57 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-12-16 14:33:57 +0800
commitd9a7b30d990e2bab67413fe11acb2d9f7096a61a (patch)
tree9f8146cd3365ad8efbc841fd76fd11a3ca9145a6
parent16c3a9991961588f43d6d280cc93317d29d242dc (diff)
downloadpttbbs-d9a7b30d990e2bab67413fe11acb2d9f7096a61a.tar
pttbbs-d9a7b30d990e2bab67413fe11acb2d9f7096a61a.tar.gz
pttbbs-d9a7b30d990e2bab67413fe11acb2d9f7096a61a.tar.bz2
pttbbs-d9a7b30d990e2bab67413fe11acb2d9f7096a61a.tar.lz
pttbbs-d9a7b30d990e2bab67413fe11acb2d9f7096a61a.tar.xz
pttbbs-d9a7b30d990e2bab67413fe11acb2d9f7096a61a.tar.zst
pttbbs-d9a7b30d990e2bab67413fe11acb2d9f7096a61a.zip
set correct file permission after building
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1414 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rwxr-xr-xstaticweb/manbuilder.pl10
1 files changed, 8 insertions, 2 deletions
diff --git a/staticweb/manbuilder.pl b/staticweb/manbuilder.pl
index 3b992a98..60b3de96 100755
--- a/staticweb/manbuilder.pl
+++ b/staticweb/manbuilder.pl
@@ -21,16 +21,17 @@ sub main
);
foreach( @ARGV ){
+ undef $idx;
if( /\.db$/ ){
next if( $Getopt::Std::opt_n );
print "building idx for $_\n";
- tie %db, 'DB_File', $_, O_RDONLY, 0666, $DB_HASH;
+ tie %db, 'DB_File', $_, O_RDONLY, 0664, $DB_HASH;
$idx = OurNet::FuzzyIndex->new(substr($_, 0, -3). '.idx');
buildidx();
}
else{
- tie %db, 'DB_File', "$_.db", O_CREAT | O_RDWR, 0666, $DB_HASH;
+ tie %db, 'DB_File', "$_.db", O_CREAT | O_RDWR, 0664, $DB_HASH;
$idx = OurNet::FuzzyIndex->new("$_.idx")
if( !$Getopt::Std::opt_n );
build("/home/bbs/man/boards/".substr($_, 0, 1)."/$_", '');
@@ -38,6 +39,11 @@ sub main
$db{_gzip} = 1 if( $Getopt::Std::opt_z );
untie %db;
}
+
+ if( $idx ){
+ undef $idx;
+ chmod 0664, "$_.idx";
+ }
}
}