lua-users home
lua-l archive

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


On 5/9/12, T T <t34www@googlemail.com> wrote:
> Strictly speaking, 'exit /b' already propagates the exit code from the
> last command, so the second argument is needed only if you don't want
> that.

Excellent!  So, we can convert .lua to .bat with three-line-prefix!

::lua::--[[
@setlocal & set luafile=%0 & if exist %0.bat set luafile=%0.bat
@lua52.exe %luafile% %* & exit /b ]]