lua-users home
lua-l archive

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




2011/2/21 T T <t34www@googlemail.com>
On 19 February 2011 18:37, Mike Pall <mikelu-1102@mike.de> wrote:
> Francesco Abbate wrote:
>> Well, may be I'm really dumb but '-jv' does not work at all, even with
>> a vanilla luajit2 build I get:
>>
>> /src/luajit: unknown luaJIT command
>
> This means it doesn't find the jit/v.lua file in the package
> search path. Consider using 'make install'.

Is it possible to configure luaJIT, so that it finds its packages
relative to the executable location?

Cheers,

Tomek


You just have to set package.path properly. 
For example you could add ./local/path/?.lua to it, where ./ is the directory you run lua from.
All that is left is to make sure that starting script changes to a proper directory "cd /script/path && lua script.lua"

--
Łukasz Gruner