[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: large scale Lua projects; directory hierarchy
- From: beo wulf <beowulf@...>
- Date: Tue, 11 Jan 2011 02:40:32 -0800
Got it; thanks!
(except i'm using ~/foo/main.lua rather than ~/foo/init.lua)
On Tue, Jan 11, 2011 at 2:07 AM, steve donovan
<steve.j.donovan@gmail.com> wrote:
> 2011/1/11 Michal Kolodziejczyk <miko@wp.pl>:
>> But you would need to add:
>> package.path=package.path..'~/lua/?.lua'
>> (expanding ~ manually I guess)
>
> Or directly in a launcher script (so _foo.lua would not be an issue)
>
> LUA_PATH=";;~/lua/?.lua"
>
>> You can already have some software installed this way, luadoc for
>> example - look for /usr/share/lua/5.1/*/*.init
>
> Either way, you need some kind of installation logic. It feels better
> that a script is self-contained and can be installed locally without
> needing to be a superuser.
>
> There are also tricks which use debug.getinfo to find out where the
> file is in the filesystem.
>
> steve d.
>
>