]> git.donarmstrong.com Git - debbugs.git/blobdiff - debian/debbugsconfig
allow specifying the dist in source_to_binary (for DB actions)
[debbugs.git] / debian / debbugsconfig
index aebd4402f2ae438d4e0ad71094c89eee1ac366e3..e98decc7255d402110ff6e19daa4af8bc302a57f 100755 (executable)
@@ -1,8 +1,13 @@
 #!/usr/bin/perl
 # debbugsconfig: copies debbugs configuration files from templates, and
 #                creates documentation in HTML and text
+# 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 Software Foundation
 
 use POSIX qw(strftime);
+use File::Path;
 
 if (@ARGV) {
   print STDOUT <<EOF;
@@ -33,6 +38,12 @@ require "text";
 &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, "../";
@@ -83,6 +94,14 @@ sub touch {
   }
 }
 
+sub spooldirectory {
+  my $name = shift;
+  unless (-d "$gSpoolDir/$name") {
+    mkpath("$gSpoolDir/$name");
+    print "$name ";
+  }
+}
+
 sub writefiles {
   local ($html, $text, $name) = @_;
 # first HTML