about summary refs log tree commit homepage
path: root/script
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-09-12 07:47:15 +0000
committerEric Wong <e@80x24.org>2021-09-12 07:48:58 +0000
commitce7053d091329b130ac107e64595d18cdbd26409 (patch)
treef06ee42fcfa10f2fdd42ab67c371fdb9b121a6c8 /script
parent9626c1a6b368dc09425c1d578ba9ce4efc1af9fc (diff)
downloadpublic-inbox-ce7053d091329b130ac107e64595d18cdbd26409.tar.gz
"Unnamed repository" for v1 inboxes was misleading, and having a
non-existent description for v2 was equally annoying, so set a
short description based on the primary address.

We remove descriptions when setting up new test inboxes to
preserve the behavior of the t/lei-mirror.t test case.
Diffstat (limited to 'script')
-rwxr-xr-xscript/public-inbox-init6
1 files changed, 6 insertions, 0 deletions
diff --git a/script/public-inbox-init b/script/public-inbox-init
index ced88235..78a4d3bd 100755
--- a/script/public-inbox-init
+++ b/script/public-inbox-init
@@ -246,3 +246,9 @@ if (defined $perm) {
 rename $pi_config_tmp, $pi_config or
         die "failed to rename `$pi_config_tmp' to `$pi_config': $!\n";
 undef $auto_unlink; # trigger ->DESTROY
+
+my $f = "$inboxdir/description";
+if (sysopen $fh, $f, O_CREAT|O_EXCL|O_WRONLY) {
+        print $fh "public inbox for $address[0]\n" or die "print($f): $!";
+        close $fh or die "close($f): $!";
+}