BeastBB/Makefile.PL
2021-06-03 23:44:00 +02:00

39 lines
1.2 KiB
Perl

use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'BeastBB',
VERSION => '0.1',
INST_SCRIPT => './bin',
INST_BIN => './bin',
test => { TESTS => 't/*.t' },
);
package MY {
sub top_targets {
my $self = shift;
my $return = $self->SUPER::top_targets(@_);
$return = [ split /\n/, $return ];
for my $i ( keys @$return ) {
$return->[$i] .= ' install_frontend_and_migrations'
if $return->[$i] =~ /^install :/;
}
return join "\n", @$return;
}
sub postamble {
return
"\n"
. "install_frontend_and_migrations:\n"
. "\tif [ ! -e lib/BeastBB/public ]; then "
. "mkdir -pv lib/BeastBB/public; " . "fi;"
. "if [ ! -e lib/BeastBB/templates ]; then "
. "mkdir -pv lib/BeastBB/templates; " . "fi; "
. "if [ ! -e lib/BeastBB/migrations ]; then "
. "mkdir -pv lib/BeastBB/migrations; " . "fi; "
. "cp -rfv templates/* lib/BeastBB/templates/; "
. "cp -rfv public/* lib/BeastBB/public/; "
. "cp -rfv migrations/* lib/BeastBB/migrations/; ";
}
}