From 43caf28474c9c9c1a5b40e72380234d8c513c17b Mon Sep 17 00:00:00 2001 From: Mason James Date: Fri, 16 Jan 2009 23:07:12 +1300 Subject: [PATCH] Fixes command-line 'number' arg in bulkauthimport.pl. for HEAD and 3.0.x Signed-off-by: Henri-Damien LAURENT --- misc/migration_tools/bulkauthimport.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/misc/migration_tools/bulkauthimport.pl b/misc/migration_tools/bulkauthimport.pl index 76aa6ebff6..e9d1e83e3c 100755 --- a/misc/migration_tools/bulkauthimport.pl +++ b/misc/migration_tools/bulkauthimport.pl @@ -27,7 +27,7 @@ my ($version, $delete, $test_parameter,$char_encoding, $verbose, $format, $commi $| = 1; GetOptions( 'file:s' => \$input_marc_file, - 'n' => \$number, + 'n:i' => \$number, 'h' => \$version, 'd' => \$delete, 't' => \$test_parameter, @@ -144,8 +144,10 @@ RECORD: while ( my $record = $batch->next() ) { warn "ADDED authority NB $authid in DB\n" if $verbose; $dbh->commit() if (0 == $i % $commitnum); } + + last if $i == $number; } $dbh->commit(); my $timeneeded = gettimeofday - $starttime; -print "$i MARC record done in $timeneeded seconds\n"; +print "\n$i MARC record done in $timeneeded seconds\n"; -- 2.39.5