[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Separate groups of scripts
- From: Shmuel Zeigerman <shmuz@...>
- Date: Wed, 23 Sep 2009 15:55:17 +0300
Michal Kolodziejczyk wrote:
There are similar problems in unix-based OSes, and are solved by
environment variables ($HOME, $PATH, etc).
So you can try something like this:
and ask every user to put their modules in their home directories, in
~/lua or /opt/common/lua/<username>.
There seems to be misunderstanding (probably because I was using the
word 'user' in a confusing way). What happens in fact is:
-- assuming the program directory is somepath/plugin
-- programmer John adds a bunch of his scripts and modules, that must be
installed in a subtree somepath/plugin/John. His initialization script
adds somepath/plugin/John/?.lua in front of package.path, and adds a
bunch of menu items to the main program's menu.
-- programmer Ann adds a bunch of her scripts and modules, that must be
installed in a subtree somepath/plugin/Ann. Her initialization script
adds somepath/plugin/Ann/?.lua in front of (already modified)
package.path, and adds another bunch of menu items to the main program's
-- there can be quite a few "programmers"
-- user Jim installs: the main program + John's scripts + Ann's scripts
-- user Jim can at any moment invoke *any* script, via the program menu
or a hot key
-- in the invoked script, require 'somelib' could access a wrong module,
if both John and Ann happened to have a module named 'somelib'.
Hopefully, it is more clear now. Sorry for verbosity.