4 |
use Data::Dumper; |
use Data::Dumper; |
5 |
use Date::Parse; |
use Date::Parse; |
6 |
use POSIX qw(strftime); |
use POSIX qw(strftime); |
7 |
|
use Getopt::Long; |
8 |
|
|
9 |
my $mws = MWS->new('global.conf'); |
# are we called from this script? |
10 |
|
my $recursive = 0; |
11 |
|
|
12 |
|
my $r = GetOptions("recursive" => \$recursive); |
13 |
|
|
14 |
|
my $config_file = shift @ARGV || 'global.conf'; |
15 |
|
|
16 |
|
if (! -f $config_file) { |
17 |
|
print qq{Usage: $0 [/path/to/local.conf] |
18 |
|
|
19 |
|
If local.conf is not specified, global.conf in current directory will |
20 |
|
be used. |
21 |
|
}; |
22 |
|
exit 1; |
23 |
|
} |
24 |
|
|
25 |
|
my $mws = MWS->new($config_file); |
26 |
|
|
27 |
|
$mws->create_index if (! $recursive); |
28 |
|
|
29 |
|
print STDERR "starting indexing..."; |
30 |
|
|
31 |
my $debug = 1; |
my $debug = 1; |
32 |
|
|