From 27eae7c3dd4e0ef13f881fe6a2a2458fb1d21346 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sun, 1 Dec 2013 22:02:56 +0200 Subject: [PATCH] Add gruntmaster-genallpages and write Makefile.PL --- Makefile.PL | 32 +++++++++++++++++++++++--------- gruntmaster-genallpages | 20 ++++++++++++++++++++ 2 files changed, 43 insertions(+), 9 deletions(-) create mode 100755 gruntmaster-genallpages diff --git a/Makefile.PL b/Makefile.PL index ea97420..4e2fa24 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,13 +1,27 @@ use 5.014000; use ExtUtils::MakeMaker; -# See lib/ExtUtils/MakeMaker.pm for details of how to influence -# the contents of the Makefile that is written. + WriteMakefile( - NAME => 'Gruntmaster::Page', - VERSION_FROM => 'lib/Gruntmaster/Page.pm', # finds $VERSION - PREREQ_PM => {}, # e.g., Module::Name => 1.1 - ($] >= 5.005 ? ## Add these new keywords supported since 5.005 - (ABSTRACT_FROM => 'lib/Gruntmaster/Page.pm', # retrieve abstract from module - AUTHOR => 'Marius Gavrilescu ') : ()), - EXE_FILES => [ qw/gruntmaster-genpage/ ] + NAME => 'Gruntmaster::Page', + VERSION_FROM => 'lib/Gruntmaster/Page.pm', + EXE_FILES => [ qw/gruntmaster-genpage gruntmaster-genallpages/ ], + ABSTRACT_FROM => 'lib/Gruntmaster/Page.pm', + AUTHOR => 'Marius Gavrilescu ', + MIN_PERL_VERSION => '5.14.0', + LICENSE => 'perl', + SIGN => 1, + PREREQ_PM => { + qw/Fcntl 0 + File::Basename 0 + IO::File 0 + POSIX 0 + + File::Slurp 0 + HTML::Template::Compiled 0 + IO::Compress::Gzip 0 + YAML::Any 0/, + }, + META_MERGE => { + dynamic_config => 0, + } ); diff --git a/gruntmaster-genallpages b/gruntmaster-genallpages new file mode 100755 index 0000000..2a08af0 --- /dev/null +++ b/gruntmaster-genallpages @@ -0,0 +1,20 @@ +#!/usr/bin/perl -w +use v5.14; + +use Gruntmaster::Page; + +sub generate{ + my $what = shift; + say STDERR "Generating $what"; + Gruntmaster::Page::generate $what; +} + +generate "${_}index.html" for '', 'ct/'; +generate "$_/index.html" for grep {-d} ; + +for my $ct ('', ) { + generate "${ct}log/index.html"; + generate "${ct}pb/index.html"; + generate "${ct}submit.html"; + generate "$_/index.html" for grep {-d} <${ct}log/*>, <${ct}pb/*>; +} -- 2.39.2