X-Git-Url: http://git.ieval.ro/?p=gruntmaster-daemon.git;a=blobdiff_plain;f=gruntmaster-compile;h=ee80c409ace3a3b010018ffb91c6e7ec6184f151;hp=af72ff81f211197c9d15bf5ab3480c509de94566;hb=cd0623f030026cc4a5c2c03d4464bb2d3cb75ca8;hpb=c88da74dc640492d03acd18721be8b250bf82a2d diff --git a/gruntmaster-compile b/gruntmaster-compile index af72ff8..ee80c40 100755 --- a/gruntmaster-compile +++ b/gruntmaster-compile @@ -28,18 +28,14 @@ given ($format){ exec 'go', qw/build -compiler gc/, $name when 'GOLANG'; exec 'go', qw/build -compiler gccgo/, $name, when 'GCCGO'; exec 'ghc', qw/-DONLINE_JUDGE -Wall -O2 -o/, $basename, $name when 'HASKELL'; - when ('SBCL') { - system 'sbcl', '--noinform', '--eval', qq/(compile-file "$name")/, '--quit' and die "sbcl failed: errno=$! return=$?"; - rename "$basename.fasl", $basename; - chmod 0755, $basename; - exit - } - when ([qw/PERL PYTHON/]){ + when ([qw/PERL PYTHON RUBY SBCL/]){ open IN, '<', $name; open OUT, '>', $basename; - print OUT "#!/usr/bin/perl\n" if $_ eq 'PERL'; - print OUT "#!/usr/bin/python\n" if $_ eq 'PYTHON'; + print OUT "#!/usr/bin/perl\n" if $_ eq 'PERL'; + print OUT "#!/usr/bin/python\n" if $_ eq 'PYTHON'; + print OUT "#!/usr/bin/ruby\n" if $_ eq 'RUBY'; + print OUT "#!/usr/bin/sbcl --script\n" if $_ eq 'SBCL'; print OUT while ; close OUT; close IN;