]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
lei_mirror: fix sh syntax error in "make help" target
authorEric Wong <e@80x24.org>
Sun, 26 Mar 2023 08:21:32 +0000 (08:21 +0000)
committerEric Wong <e@80x24.org>
Sun, 26 Mar 2023 11:45:56 +0000 (11:45 +0000)
Oops :x

Fixes: 836faf5093df ("lei_mirror: add `index' target to generated Makefile")
lib/PublicInbox/LeiMirror.pm
t/lei-mirror.t

index c437b7892b3287552a8ba32a627f43d66df45ffb..e0709fbdedf01774e44632e525d67be866aa8845 100644 (file)
@@ -1370,7 +1370,7 @@ help :
        @echo Rarely needed targets:
        @echo '    make reindex      - may be needed for new features/bugfixes'
        @echo '    make compact      - rewrite Xapian storage to save space'
-       @echo '    make index        - initial index after clone
+       @echo '    make index        - initial index after clone'
 
 fetch :
        public-inbox-fetch
index c172483b9b57387d06957ca566cabae5c5ae8038..2400578a76f306d6d637a488154523cc3f371c57 100644 (file)
@@ -1,10 +1,11 @@
 #!perl -w
-# Copyright (C) 2020-2021 all contributors <meta@public-inbox.org>
+# Copyright (C) all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict; use v5.10.1; use PublicInbox::TestCommon;
 use PublicInbox::Inbox;
 require_mods(qw(-httpd lei DBD::SQLite));
 require_cmd('curl');
+use PublicInbox::Spawn qw(which);
 require PublicInbox::Msgmap;
 my $sock = tcp_server();
 my ($tmpdir, $for_destroy) = tmpdir();
@@ -25,7 +26,10 @@ test_lei({ tmpdir => $tmpdir }, sub {
        is(PublicInbox::Git::try_cat("$t1/description"),
                "mirror of $http/t1/\n", 'description set');
        ok(-f "$t1/Makefile", 'convenience Makefile added (v1)');
+       my $make = which('make');
+       xsys_e([$make, 'help'], undef, { -C => $t1, 1 => \(my $help) });
        ok(-f "$t1/inbox.config.example", 'inbox.config.example downloaded');
+       isnt($help, '', 'make help worked');
        is((stat(_))[9], $created{v1},
                'inbox.config.example mtime is ->created_at');
        is((stat(_))[2] & 0222, 0, 'inbox.config.example not writable');