lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hey,

I found this gem in Peter Cawley's excellent summary of the changes in 
5.2-work3:  luaL_loadfile no longer accepts bytecode files with a 
shebang.

I've been prepending a shebang line to binaries produced by luac to 
make them automatically executable under linux:

$ luac foo.lua bar.lua baz.lua
$ echo '#! '`which lua` >theapp
$ cat luac.out >>theapp
$ chmod +x ./theapp

This works great in lua 5.1 and avoids an extra shell script wrapper I 
used to use to invoke the interpreter.  With lua 5.2-work3, this no 
longer works.  Could this approach to executable bytecode files be 
supported in lua 5.2 though?

Cheers,

Joonas