|
Revision 260
(checked in by miyagawa, 3 years ago)
|
use FindBin? to map default config file. patch from Naoya Ito
|
- Property svn:executable set to
*
|
| Line | |
|---|
| 1 |
#!/usr/bin/perl |
|---|
| 2 |
use strict; |
|---|
| 3 |
use warnings; |
|---|
| 4 |
use FindBin; |
|---|
| 5 |
use File::Spec; |
|---|
| 6 |
|
|---|
| 7 |
use lib File::Spec->catdir($FindBin::Bin, 'lib'); |
|---|
| 8 |
use Plagger; |
|---|
| 9 |
|
|---|
| 10 |
use Getopt::Long; |
|---|
| 11 |
|
|---|
| 12 |
my $config = File::Spec->catfile($FindBin::Bin, 'config.yaml'); |
|---|
| 13 |
GetOptions('--config=s', \$config, '--version' => \my $version); |
|---|
| 14 |
Getopt::Long::Configure("bundling"); # allows -c -v |
|---|
| 15 |
|
|---|
| 16 |
if ($version) { |
|---|
| 17 |
print "Plagger version $Plagger::VERSION\n"; |
|---|
| 18 |
exit; |
|---|
| 19 |
} |
|---|
| 20 |
|
|---|
| 21 |
Plagger->bootstrap(config => $config); |
|---|
| 22 |
|
|---|