Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 05 Apr 2011 17:23:47 +0200
From:      =?ISO-8859-15?Q?Michael_Gr=FCnewald?= <>
To:        FreeBSD questions <>
Subject:   Place to install library of shell functions
Message-ID:  <>

Next in thread | Raw E-Mail | Index | Archive | Help
Dear FreeBSD users,

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:

 > find /usr/local/lib -name '*.sh'

Two files (the `/usr/local/lib/tcl8.5/' one and the 
`s/tcl/tk/g' one) are actually shell script libraries (defining a bunch 
of variables), and all the others are ancillary scripts, that would 
maybe better fit in `/usr/local/libexec'.

So, practical experience does not really second my a priori that these 
files sould go under the `share' hierarchy and I would like to have your 
opinion on this question.
Best Regards,

Want to link to this message? Use this URL: <>