From dbd5d64f321f42bf18d21b5274e88f7ffa1b44da Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sat, 14 Feb 2015 18:49:21 +0200 Subject: [PATCH] Treat SBCL files as scripts --- gruntmaster-compile | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/gruntmaster-compile b/gruntmaster-compile index af72ff8..6ff8dd7 100755 --- a/gruntmaster-compile +++ b/gruntmaster-compile @@ -28,18 +28,13 @@ 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 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/sbcl --script\n" if $_ eq 'SBCL'; print OUT while ; close OUT; close IN; -- 2.30.2