#!/usr/bin/env perl
use strict;
use IO::All;
binmode STDOUT, ":utf8";
if (grep { /^-?-init$/ } @ARGV) {
my $BASE = "$ENV{HOME}/.syndicator";
mkdir "$BASE";
io("$BASE/main.db") < ""
unless -f "$BASE/main.db";
my $config_template = '{
"sources": [
]
}';
io("$BASE/config.json") < $config_template
unless -f "$BASE/config.json";
print "Done!\n";
exit;
}
App::Syndicator->new_with_options->run;