Save compile errors
[gruntmaster-daemon.git] / gruntmaster-compile
CommitLineData
da905f9e
MG
1#!/usr/bin/perl -w
2use v5.14;
3no if $] > 5.017011, warnings => 'experimental::smartmatch';
4
5my ($format, $basename, $name) = @ARGV;
6my $ret = fork // die $!;
7if ($ret) {
8 $SIG{ALRM} = sub {kill KILL => $ret};
9 alarm 5;
10 wait;
11 exit $? >> 8
12} else {
13 given ($format){
14 exec 'g++', '-o', $basename, $name when 'CPP';
15 }
16}
This page took 0.010858 seconds and 4 git commands to generate.