scsh-users
[Top] [All Lists]

Re: local modules

To: scsh-news@zurich.ai.mit.edu
Subject: Re: local modules
From: Ed Kademan <kademan@phz.com>
Date: 06 Nov 2002 16:21:23 -0500
darren.bane@intel.com (Darren Bane) writes:

> Ed Kademan <kademan@phz.com> wrote in message 
> news:<ulghef1z98h.fsf@phz.com>...
> > What is a good strategy for installing local modules for scsh?  I'd
> > like to package up code so that different programs can share via the
> > "-lm" command line switch but ideally I'd like to not have to specify
> > the complete path names.
> 
> I get away with just using one complete path name by keeping all my
> own module declarations in one file, packages.scm.  Then "-lm
> /home/djbane/scm/packages.scm" takes care of it.
> 
> This is less work for me than you'd think because I use nuweb
> (http://nuweb.sf.net/) to write literate scripts.  I just define a
> standard "interpreter trigger" macro, with the -lm flag, and insert
> this at the top of all my scripts.
> 
> :-)  It's more fun to write code that writes code.
> 
> > For example when you "use" and "require" packages in perl that
> > language automatically searches for the corresponding files in a
> > user-modifiable path of directories, one of whose entries is a
> > site-specific directory that doesn't get trashed every time you
> > upgrade.
> 
> I'm not aware of anything like the PERL5LIB environment variable.

Thanks to Steve Elkins and "stk trc" I learned of a mechanism that
does this very thing.  You can use the -ll switch and the
$SCSH_LIB_DIRS environment variable.  The explanation is at

  http://www.scsh.net/post/libsearch.html

<Prev in Thread] Current Thread [Next in Thread>