Fixes command-line 'number' arg in bulkauthimport.pl.

for HEAD and 3.0.x

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This commit is contained in:
Mason James 2009-01-16 23:07:12 +13:00 committed by Galen Charlton
parent 7fb039f6c0
commit e9599f973c
1 changed files with 4 additions and 2 deletions

View File

@ -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";