+my $eidx_dir = shift(@ARGV);
+unless (defined $eidx_dir) {
+ if ($opt->{all} && $cfg->ALL) {
+ $eidx_dir = $cfg->ALL->{topdir};
+ } else {
+ die "E: $help";
+ }
+}
+my @ibxs;
+if ($opt->{gc}) {
+ die "E: inbox paths must not be specified with --gc\n" if @ARGV;
+ for my $sw (qw(all watch dry-run dedupe)) {
+ die "E: --$sw is not compatible with --gc\n" if $opt->{$sw};
+ }
+} else {
+ @ibxs = PublicInbox::Admin::resolve_inboxes(\@ARGV, $opt, $cfg);
+}
+$opt->{'dry-run'} && !$opt->{dedupe} and
+ die "E: --dry-run only affects --dedupe\n";
+$opt->{fast} && !$opt->{reindex} and
+ die "E: --fast only affects --reindex\n";
+