Re: Place to install library of shell functions



In the last episode (Apr 05), Michael Grünewald said:
today I come to you with what seems to be somehow pedantic question: where
is the best place to install libraries of shell functions.

I read hier(4) carefully and it seems the correct place for this would
be somewhere under `/usr/local/share':

share/ architecture-independent files

On the base systems, many macros (make templates and groff macros) are
actually installed under /usr/share. However, the only library of shell
functions I am aware of is `/etc/rc.subr', that landed on this funny
location, probably to be pretty sure that this library is on the same
filesystem as the scripts under /etc/rc.d.

Several of the ports install shell scripts under `/usr/local/lib' that
hier(4) devotes to ``shared and archive ar(1)-type libraries''. These
shell scripts are:

The zsh port installs all its helper scripts and functions into
/usr/local/share/zsh , and the portupgrade and portmaster ports insert their
zsh autocompletion functions into /usr/local/share/zsh/site-functions.
Seems to work great. Ports that install scripts into /usr/local/lib
probably either don't have separate script and lib install paths in their
makefile (tcl probably), or their scripts aren't meant to be called directly
(firefox).

--
Dan Nelson
dnelson@xxxxxxxxxxxxxxx
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: bytecode non-backcompatibility
    ... libraries you need for your application are already available. ... This isn't really different from Python. ... tedious and risk breaking old scripts, ... Python can then have a built-in mechanism to read the description file and download the source codes and do the standard "sudo python setup.py install" to install the library into site-package. ...
    (comp.lang.python)
  • Place to install library of shell functions
    ... However, the only library of shell functions I am aware of is `/etc/rc.subr', that landed on this funny location, probably to be pretty sure that this library is on the same filesystem as the scripts under /etc/rc.d. ... Several of the ports install shell scripts under `/usr/local/lib' that hierdevotes to ``shared and archive ar-type libraries''. ... Two files are actually shell script libraries, and all the others are ancillary scripts, that would maybe better fit in `/usr/local/libexec'. ...
    (freebsd-questions)
  • Re: Place to install library of shell functions
    ... where is the best place to install libraries of shell functions. ... Several of the ports install shell scripts under `/usr/local/lib' that ...
    (freebsd-questions)
  • Re: Place to install library of shell functions
    ... where is the best place to install libraries of shell functions. ...
    (freebsd-questions)
  • Re: common-lisp-controller vs. asdf-install
    ... I can't find a description where to put libraries ... downloaded manually or by asdf-install. ... If all you want to do is install ASDF based libs for your own use, ... If this is the case you can download and install the library directly by ...
    (comp.lang.lisp)