From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id D3DCC1F4B4 for ; Thu, 10 Sep 2020 05:46:04 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] wwwstream: show init + index instructions for -V1, too Date: Thu, 10 Sep 2020 05:46:04 +0000 Message-Id: <20200910054604.31820-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: This should've always been there. I'm not sure how widely spread 1.0 and earlier releases were, but we'll keep documenting the version requirement. --- lib/PublicInbox/WwwStream.pm | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm index e27da8c2..f7e09c24 100644 --- a/lib/PublicInbox/WwwStream.pm +++ b/lib/PublicInbox/WwwStream.pm @@ -122,23 +122,18 @@ EOF push @urls, $u =~ /\Ahttps?:/ ? qq($u) : $u; } - $urls .= "\n" . join("\n", map { "\tgit clone --mirror $_" } @urls); - if (defined $max) { - my $addrs = $ibx->{address}; - $addrs = join(' ', @$addrs) if ref($addrs) eq 'ARRAY'; - $urls .= <{address}; + $addrs = join(' ', @$addrs) if ref($addrs) eq 'ARRAY'; + my $v = defined $max ? '-V2' : '-V1'; + $urls .= <{name} $dir/ $http \\ + public-inbox-init $v $ibx->{name} $dir/ $http \\ $addrs public-inbox-index $dir EOF - } else { # v1 - $urls .= "\n"; - } - my $cfg_link = ($ctx->{-upfx} // '').'_/text/config/raw'; $urls .= <