diff options
author | Eric Wong <e@yhbt.net> | 2020-01-25 04:44:59 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-01-27 02:59:09 +0000 |
commit | e3e9ebdaaf2c2f8192fc003f1857979f933b9a8b (patch) | |
tree | 6076cbecbd8457ff226afa41b0e0215cbe7463d3 | |
parent | f480471dadbd10bf6cbcf87aa3580a9cd6391f8f (diff) | |
download | public-inbox-e3e9ebdaaf2c2f8192fc003f1857979f933b9a8b.tar.gz |
We already load PublicInbox::Import via PublicInbox::InboxWritable, so it's not an extra module to load. This can give us a slight speedup in tests.
-rwxr-xr-x | script/public-inbox-init | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/script/public-inbox-init b/script/public-inbox-init index 34c93b47..6221871e 100755 --- a/script/public-inbox-init +++ b/script/public-inbox-init @@ -16,6 +16,7 @@ use PublicInbox::Admin; PublicInbox::Admin::require_or_die('-base'); use PublicInbox::Config; use PublicInbox::InboxWritable; +use PublicInbox::Import; use File::Temp qw/tempfile/; use PublicInbox::Lock; use File::Basename qw/dirname/; @@ -23,7 +24,6 @@ use File::Path qw/mkpath/; use Fcntl qw(:DEFAULT); use Cwd qw/abs_path/; -sub x { system(@_) and die join(' ', @_). " failed: $?\n" } my $version = undef; my $indexlevel = undef; my $skip_epoch; @@ -151,13 +151,13 @@ umask(0077) if defined $perm; foreach my $addr (@address) { next if $seen{lc($addr)}; - x(@x, "--add", "$pfx.address", $addr); + PublicInbox::Import::run_die([@x, "--add", "$pfx.address", $addr]); } -x(@x, "$pfx.url", $http_url); -x(@x, "$pfx.inboxdir", $inboxdir); +PublicInbox::Import::run_die([@x, "$pfx.url", $http_url]); +PublicInbox::Import::run_die([@x, "$pfx.inboxdir", $inboxdir]); if (defined($indexlevel)) { - x(@x, "$pfx.indexlevel", $indexlevel); + PublicInbox::Import::run_die([@x, "$pfx.indexlevel", $indexlevel]); } # needed for git prior to v2.1.0 |