diff options
author | Eric Wong <e@80x24.org> | 2019-05-23 09:36:53 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-05-23 17:43:50 +0000 |
commit | 7a097dce831a9ad3a99e50013138e57a0def514e (patch) | |
tree | 4e0c12f425205168e58bc83c3a4063c53d21ddc9 /script | |
parent | 0c6d38221ec9fbf9d7c7e0329252b10f17ab7a27 (diff) | |
download | public-inbox-7a097dce831a9ad3a99e50013138e57a0def514e.tar.gz |
Copying an entire Xapian DB is horribly slow whether it's done via Perl or copydatabase(1). So displaying some progress indication is good for user experience. While we're at it, prefix xapian-compact output, too; since parallel processes end up clobbering each other.
Diffstat (limited to 'script')
-rwxr-xr-x | script/public-inbox-xcpdb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/script/public-inbox-xcpdb b/script/public-inbox-xcpdb index 78d37da2..5b66337b 100755 --- a/script/public-inbox-xcpdb +++ b/script/public-inbox-xcpdb @@ -9,12 +9,9 @@ use PublicInbox::Admin; PublicInbox::Admin::require_or_die('-search'); my $usage = "Usage: public-inbox-xcpdb INBOX_DIR\n"; my $opt = {}; -GetOptions($opt, qw(compact)) or die "bad command-line args\n$usage"; +GetOptions($opt, qw(compact quiet|q)) or die "bad command-line args\n$usage"; my @ibxs = PublicInbox::Admin::resolve_inboxes(\@ARGV) or die $usage; - my $cmd = [ \&PublicInbox::Xapcmd::cpdb ]; -open my $null, '>', '/dev/null' or die "failed to open /dev/null: $!\n"; -$opt->{1} = fileno($null); foreach (@ibxs) { my $ibx = PublicInbox::InboxWritable->new($_); # we rely on --no-renumber to keep docids synched to NNTP |