]> git.donarmstrong.com Git - debbugs.git/commitdiff
Create /etc/debbugs/indices/ if needed (closes: #592117)
authorBill Allombert <Bill.Allombert@math.u-bordeaux.fr>
Sun, 29 Dec 2024 14:32:23 +0000 (15:32 +0100)
committerBill Allombert <Bill.Allombert@math.u-bordeaux.fr>
Sun, 29 Dec 2024 14:34:03 +0000 (15:34 +0100)
debian/debbugsconfig

index e98decc7255d402110ff6e19daa4af8bc302a57f..1e6bfa49bc882cb525db3c8062732a31882bf343 100755 (executable)
@@ -79,9 +79,13 @@ exit(0);
 sub template {
   my ($name, $destdir) = @_;
   if (! -f "$destdir/$name") {
-  system("cp /usr/share/doc/debbugs/examples/$name $destdir/$name") == 0 ||
-       die "$!";
-  print "created $destdir/$name from template.\n";
+    if (! -d $destdir ) {
+      File::Path::make_path($destdir, {'mode' => 0755 });
+      print "created $destdir/.\n";
+    }
+    system("cp /usr/share/doc/debbugs/examples/$name $destdir/$name") == 0 ||
+          die "$!";
+    print "created $destdir/$name from template.\n";
   }
 }