projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove traling spaces from non empty lines in command output
[spider.git]
/
cmd
/
dbimport.pl
diff --git
a/cmd/dbimport.pl
b/cmd/dbimport.pl
index 55d5e6322c00c4975e7387f90f2ca02e89781049..797805eaee2d7513246b81d88b303ad4430c94a0 100644
(file)
--- a/
cmd/dbimport.pl
+++ b/
cmd/dbimport.pl
@@
-31,14
+31,18
@@
while (<IMP>) {
}
$key = uc $_;
$value = undef;
}
$key = uc $_;
$value = undef;
- ++$state;
+ ++$state
if $key
;
} elsif ($state == 1) {
if (/^\&\&/) {
if ($key =~ /^#/) {
} elsif ($state == 1) {
if (/^\&\&/) {
if ($key =~ /^#/) {
+ } elsif ($key && $value) {
+ $db->putkey($key, $value);
+ $count++;
}
}
- $db->putkey($key, $value);
$state = 0;
$state = 0;
- $count++;
+ next;
+ } elsif (/^\%\%/) {
+ $state = 0;
next;
}
$value .= $_ . "\n";
next;
}
$value .= $_ . "\n";