bluto

Release package and announcement generator
Info | Log | Files | Refs | README | LICENSE

bluto-boot (1423B)


      1 #!/usr/bin/env perl
      2 
      3 use v5.10.1;
      4 use warnings;
      5 use strict;
      6 
      7 use File::Basename qw/ dirname /;
      8 use Cwd qw/ getcwd abs_path /;
      9 use lib (dirname(abs_path($0)));
     10 
     11 use Bluto::Cmd;
     12 
     13 #Bluto::Cmd::register_param("version", undef, "version", undef);
     14 Bluto::Cmd::register_param("name", undef, "name", undef);
     15 Bluto::Cmd::register_param("summary", undef, "summary", undef);
     16 my $usr = $ENV{LOGNAME} || $ENV{USER} || getpwuid($<);
     17 Bluto::Cmd::register_param("maintainer", $usr, undef, undef);
     18 
     19 Bluto::Cmd::process_param();
     20 
     21 #my $v = Bluto::Cmd::get_param("version");
     22 #if (!defined $v) {
     23 #	Bluto::Cmd::croak($v);
     24 #}
     25 
     26 my $name = Bluto::Cmd::get_param('name');
     27 my $slug;
     28 if (defined $name) {
     29 	my $slug = lc($name);
     30 	$slug =~ y/ /_/;
     31 	$slug =~ s/[^a-zA-Z0-9_]//g;
     32 }
     33 
     34 my $yc = {
     35 	name => $name,
     36 	slug => $slug,
     37 	summary => Bluto::Cmd::get_param('summary'),
     38 	license => "",
     39 	copyright => "",
     40 	tech => "",
     41 	vcs => {
     42 		tag_prefix => "v",
     43 	},
     44 	sign => {
     45 		rsa => "",
     46 		ed22519 => "",
     47 		secp256k1 => "",
     48 	},
     49 	fund => {
     50 		btc => "",
     51 		eth => "",
     52 		monero => "",
     53 	},
     54 	locate => {
     55 		www => [],
     56 		rel => [],
     57 		vcs => [],
     58 		tgzbase => [],
     59 	},
     60 	author => {
     61 		name => "",
     62 		email => "",
     63 		pgp => "",
     64 	},
     65 	maintainer => {
     66 		name => Bluto::Cmd::get_param('maintainer'),
     67 		email => "",
     68 		pgp => "",
     69 	},
     70 };
     71 
     72 my $yo = YAML::Tiny->new($yc);
     73 #my $fn = File::Spec->catfile($env{src_dir}, 'bluto.yml');
     74 my $fn = Bluto::Cmd::base_config_path();
     75 $yo->write($fn);