X-Git-Url: http://git.ieval.ro/?p=gruntmaster-daemon.git;a=blobdiff_plain;f=lib%2FGruntmaster%2FDaemon.pm;h=a4d1902b0cfa6fb9f36e196ea976da3a863996e6;hp=b5d210de4e4454131f3c3403999268b2e7508a74;hb=ad77b7d3dee6e61405535dd0dabd117398731ad1;hpb=ad4bd022cfaea149b8af3219234617f420d556cf diff --git a/lib/Gruntmaster/Daemon.pm b/lib/Gruntmaster/Daemon.pm index b5d210d..a4d1902 100644 --- a/lib/Gruntmaster/Daemon.pm +++ b/lib/Gruntmaster/Daemon.pm @@ -7,7 +7,7 @@ use warnings; our $VERSION = '0.001'; use Gruntmaster::Daemon::Constants qw/ERR/; -use Gruntmaster::Daemon::Format qw/mkrun/; +use Gruntmaster::Daemon::Format qw/prepare_files/; use Gruntmaster::Data; use File::Basename qw/fileparse/; @@ -38,29 +38,6 @@ sub safe_can { safe_can_nodie @_ or get_logger->logdie("No such \l$type: '$name'"); } -sub prepare{ - my ($name, $format) = @_; - our $errors; - my $basename = fileparse $name, qr/\.[^.]*/; - get_logger->trace("Preparing file $name..."); - - $errors .= `gruntmaster-compile $format $basename $name 2>&1`; - $errors .= "\n"; - die 'Compile error' if $? -} - -sub prepare_files{ - my $meta = shift; - - for my $file (values $meta->{files}) { - my ($format, $name, $content) = @{$file}{qw/format name content/}; - - $file->{run} = mkrun($format); - write_file $name, $content; - prepare $name, $format; - } -} - sub process{ my $job = shift;