bluto-pub (1216B)
1 #!/usr/bin/env perl 2 3 use v5.10.1; 4 use warnings; 5 use strict; 6 7 use File::Spec; 8 use File::Basename qw/ dirname /; 9 use Cwd qw/ getcwd abs_path /; 10 use lib (dirname(abs_path($0))); 11 12 use Bluto::Log qw/debug/; 13 use Bluto::Cmd; 14 use Bluto; 15 16 Bluto::Cmd::register_param("version", undef, "version", undef); 17 Bluto::Cmd::register_param("out_dir", File::Spec->catfile(getcwd, 'bluto_build'), undef, "o"); 18 Bluto::Cmd::register_param("feed_dir", undef, "feed-dir", undef); 19 Bluto::Cmd::register_param("content_dir", undef, "code-dir", "c"); 20 Bluto::Cmd::register_param("readme", undef, undef, undef); 21 22 Bluto::Cmd::process_param(); 23 24 my $env = Bluto::Cmd::params(); 25 my $version = Bluto::Cmd::get_version(); 26 27 my $ym = Bluto::Cmd::base_config(); 28 my $yv = Bluto::Cmd::release_config(); 29 if (!defined $env) { 30 die("not sane"); 31 } 32 33 $version = Bluto::from_yaml($ym, $yv, $env); 34 if (!defined $version) { 35 die("config processing failed"); 36 } 37 38 my $announce = Bluto::create_announce($env); 39 if (!defined $announce) { 40 die("announce processing failed"); 41 } 42 43 my $yr = Bluto::create_yaml($ym, $yv, $env); 44 if (!defined $yr) { 45 die("yaml output processing failed"); 46 } 47 48 my $rss = Bluto::create_rss($env); 49 if (!defined $rss) { 50 die("rss processing failed"); 51 }