[racket] Current advice on making a 'script'

From: Anthony Carrico (acarrico at memebeam.org)
Date: Wed Jan 14 09:14:13 EST 2015

On 01/14/2015 08:41 AM, Jay McCarthy wrote:
> This is what I do:
> 
> 1. Create a directory where the files will go: $ROOT
> 
> I do this anyways, because everything is in git somewhere.
> 
> 2. Make prog.sh in $ROOT that looks like this:
> 
> #!/bin/sh
> 
> cd $(dirname $(grealpath $0))
> racket -t prog.rkt

I've always lamented the fact that #lang interferes with #!interpreter
on Unix, so this needs to run /bin/sh, but I think you can do

exec racket ...

as the final line here to avoid forking one extra process.

-- 
Anthony Carrico

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.racket-lang.org/users/archive/attachments/20150114/11924fbc/attachment.sig>

Posted on the users mailing list.