summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-10-27 02:30:44 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-10-27 02:30:44 +0800
commit708332f55a43d441c86cb2002a6dea16c5245d4d (patch)
treea3ce4fb27a3a853c35150a11962d9d9c9477d332 /util
parent2b6e95a4451743f38ef2b59b768a2eb47261d3fc (diff)
downloadpttbbs-708332f55a43d441c86cb2002a6dea16c5245d4d.tar
pttbbs-708332f55a43d441c86cb2002a6dea16c5245d4d.tar.gz
pttbbs-708332f55a43d441c86cb2002a6dea16c5245d4d.tar.bz2
pttbbs-708332f55a43d441c86cb2002a6dea16c5245d4d.tar.lz
pttbbs-708332f55a43d441c86cb2002a6dea16c5245d4d.tar.xz
pttbbs-708332f55a43d441c86cb2002a6dea16c5245d4d.tar.zst
pttbbs-708332f55a43d441c86cb2002a6dea16c5245d4d.zip
new
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@545 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util')
-rw-r--r--util/initbbs.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/util/initbbs.c b/util/initbbs.c
index f88daf92..8d95534c 100644
--- a/util/initbbs.c
+++ b/util/initbbs.c
@@ -1,4 +1,4 @@
-/* $Id: initbbs.c,v 1.4 2002/05/25 11:17:55 ptt Exp $ */
+/* $Id: initbbs.c,v 1.5 2002/10/26 18:30:44 in2 Exp $ */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -34,6 +34,35 @@ static void initHome() {
}
}
+static void initBoardsDIR() {
+ int i;
+ char buf[256];
+
+ mkdir("boards", 0755);
+ strcpy(buf, "boards/?");
+ for(i = 0; i < 26; i++) {
+ buf[7] = 'A' + i;
+ mkdir(buf, 0755);
+ buf[7] = 'a' + i;
+ mkdir(buf, 0755);
+ }
+}
+
+static void initManDIR() {
+ int i;
+ char buf[256];
+
+ mkdir("man", 0755);
+ mkdir("man/boards", 0755);
+ strcpy(buf, "man/boards/?");
+ for(i = 0; i < 26; i++) {
+ buf[11] = 'A' + i;
+ mkdir(buf, 0755);
+ buf[11] = 'a' + i;
+ mkdir(buf, 0755);
+ }
+}
+
static void initPasswds() {
int i;
userec_t u;
@@ -212,6 +241,8 @@ int main() {
initDir();
initHome();
+ initBoardsDIR();
+ initManDIR();
initPasswds();
initBoards();
initMan();