# Copyright (C) 1999 Darren Benham
# Copyright (C) 2000 Josip Rodin
# Licensed under the version 2 of the GNU General Public License as
-# published by the Free
+# published by the Free Software Foundation
use POSIX qw(strftime);
+use File::Path;
if (@ARGV) {
print STDOUT <<EOF;
&template("nextnumber", $gSpoolDir);
&touch("$gSpoolDir/index.archive.realtime");
&touch("$gSpoolDir/index.db.realtime");
+print "Creating directories in $gSpoolDir:\n";
+for my $num (0 .. 99) {
+ &spooldirectory(sprintf('archive/%02d', $num));
+ &spooldirectory(sprintf('db-h/%02d', $num));
+}
+print "\n";
# stuff used when testing (comment out the above)
#unshift @INC, "../";
}
}
+sub spooldirectory {
+ my $name = shift;
+ unless (-d "$gSpoolDir/$name") {
+ mkpath("$gSpoolDir/$name");
+ print "$name ";
+ }
+}
+
sub writefiles {
local ($html, $text, $name) = @_;
# first HTML