]> Sergey Matveev's repositories - public-inbox.git/blobdiff - script/public-inbox-clone
clone: support --keep-going/-k like make(1)
[public-inbox.git] / script / public-inbox-clone
index a11c68744014ab8ebb06df6bebd77a0864ceaca6..efe0cff6f50c0a94382219227e9eee82a85d304b 100755 (executable)
@@ -24,6 +24,7 @@ options:
 EOF
 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
+       prune|p keep-going|k
        dry-run|n jobs|j=i no-torsocks torsocks=s epoch=s)) or die $help;
 if ($opt->{help}) { print $help; exit };
 require PublicInbox::Admin; # loads Config
@@ -37,6 +38,7 @@ defined($dst) or ($dst) = ($url =~ m!/([^/]+)/?\z!);
 index($dst, "\n") >= 0 and die "`\\n' not allowed in `$dst'";
 
 # n.b. this is still a truckload of code...
+require File::Spec;
 require PublicInbox::LEI;
 require PublicInbox::LeiExternal;
 require PublicInbox::LeiMirror;
@@ -51,7 +53,7 @@ open $lei->{3}, '.' or die "open . $!";
 my $mrr = bless {
        lei => $lei,
        src => $url,
-       dst => $dst,
+       dst => File::Spec->canonpath($dst),
 }, 'PublicInbox::LeiMirror';
 
 $? = 0;