X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=script%2Fpublic-inbox-convert;h=56a810eb054ffc1ea41585eab1052dabb0b7bc12;hb=227a1d886672767e37cc86a3432952c14eb8a143;hp=3182410e0a6f0e5037bc41b3b0a8bd040389f072;hpb=fece7fca6aeac74410a813cffcb0da338017d0ed;p=public-inbox.git diff --git a/script/public-inbox-convert b/script/public-inbox-convert index 3182410e..56a810eb 100755 --- a/script/public-inbox-convert +++ b/script/public-inbox-convert @@ -4,11 +4,9 @@ use strict; use warnings; use Getopt::Long qw(:config gnu_getopt no_ignore_case auto_abbrev); -use PublicInbox::MIME; use PublicInbox::InboxWritable; use PublicInbox::Config; use PublicInbox::V2Writable; -use PublicInbox::Import; use PublicInbox::Spawn qw(spawn); use Cwd 'abs_path'; use File::Copy 'cp'; # preserves permissions: @@ -20,7 +18,6 @@ my %opts = ( '--index!' => \$index, ); GetOptions(%opts) or die "bad command-line args\n$usage"; -GetOptions(%opts) or die "bad command-line args\n$usage"; my $old_dir = shift or die $usage; my $new_dir = shift or die $usage; die "$new_dir exists\n" if -d $new_dir; @@ -44,7 +41,7 @@ unless ($old) { $old = PublicInbox::Inbox->new($old); } $old = PublicInbox::InboxWritable->new($old); -if (($old->{version} || 1) >= 2) { +if ($old->version >= 2) { die "Only conversion from v1 inboxes is supported\n"; } my $new = { %$old };