11 print Dumper($config);
15 getopts('d:m:q', \%opts);
17 my $db_dir = $opts{d};
19 die "usage: $0 -d [database_dir] -m [database1,database2] " if (! %opts);
21 #--------------------------------------------------------------------
25 my @isis_dirs = ( '.' ); # use dirname as database name
28 @isis_dirs = split(/,/,$opts{m});
33 foreach (@isis_dirs) {
34 if (-e "$common::isis_data/$db_dir/$_/LIBRI") {
35 push @isis_dbs,"$common::isis_data/$db_dir/$_/LIBRI/LIBRI";
37 if (-e "$common::isis_data/$db_dir/$_/PERI") {
38 push @isis_dbs,"$common::isis_data/$db_dir/$_/PERI/PERI";
40 if (-e "$common::isis_data/$db_dir/$_/AMS") {
41 push @isis_dbs,"$common::isis_data/$db_dir/$_/AMS/AMS";
43 if (-e "$common::isis_data/$db_dir/$_/ARTI") {
44 # push @isis_dbs,"$common::isis_data/$db_dir/$_/ARTI/ARTI";
48 foreach my $isis_db (@isis_dbs) {
50 my $db = OpenIsis::open( "$isis_db" ) || warn "can't open '$isis_db'";
52 my $max_rowid = OpenIsis::maxRowid( $db );
56 for (my $row_id = 1; $row_id <= $max_rowid; $row_id++ ) {
57 my $row = OpenIsis::read( $db, $row_id );
59 # output current process indicator
60 my $pcnt = int($row->{mfn} * 100 / $max_rowid);
61 if ($pcnt != $last_pcnt) {
62 printf STDERR ("%5d / %5d -- %-2d %%\n",$row->{mfn},$max_rowid,$pcnt) if (! $opts{q});