about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/PublicInbox/LeiMirror.pm8
-rwxr-xr-xscript/public-inbox-clone2
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/PublicInbox/LeiMirror.pm b/lib/PublicInbox/LeiMirror.pm
index 4dedac9b..e4aa620e 100644
--- a/lib/PublicInbox/LeiMirror.pm
+++ b/lib/PublicInbox/LeiMirror.pm
@@ -1110,7 +1110,13 @@ sub try_manifest {
         $self->{-torsocks} //= $curl->torsocks($lei, $uri) or return;
         my $path = $uri->path;
         chop($path) eq '/' or die "BUG: $uri not canonicalized";
-        $uri->path($path . '/manifest.js.gz');
+        my $rmf = $lei->{opt}->{'remote-manifest'} // '/manifest.js.gz';
+        if ($rmf =~ m!\A[^/:]+://!) {
+                $uri = URI->new($rmf);
+        } else {
+                $rmf = "/$rmf" if index($rmf, '/') != 0;
+                $uri->path($path.$rmf);
+        }
         my $manifest = $self->{-manifest} // "$self->{dst}/manifest.js.gz";
         my %opt = (UNLINK => 1, SUFFIX => '.tmp', TMPDIR => 1);
         if (!$self->{dry_run} && $manifest =~ m!\A(.+?)/[^/]+\z! and -d $1) {
diff --git a/script/public-inbox-clone b/script/public-inbox-clone
index 598979bc..10ad3487 100755
--- a/script/public-inbox-clone
+++ b/script/public-inbox-clone
@@ -27,7 +27,7 @@ EOF
 # support both :/
 GetOptions($opt, qw(help|h quiet|q verbose|v+ C=s@ c=s@ include|I=s@ exclude=s@
         inbox-config=s inbox-version=i objstore=s manifest=s
-        project-list|projectslist=s post-update-hook=s@
+        remote-manifest=s project-list|projectslist=s post-update-hook=s@
         prune|p keep-going|k exit-code
         dry-run|n jobs|j=i no-torsocks torsocks=s epoch=s)) or die $help;
 if ($opt->{help}) { print $help; exit };