Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Apr 2011 12:09:40 -0400
From:      mikel king <mikel.king@olivent.com>
To:        =?iso-8859-1?Q?Michael_Gr=FCnewald?= <michaelgrunewald@yahoo.fr>
Cc:        FreeBSD questions <freebsd-questions@freebsd.org>
Subject:   Re: Place to install library of shell functions
Message-ID:  <0434933C-E308-4D77-8180-21E90B7B23A8@olivent.com>
In-Reply-To: <4D9B3403.2070704@yahoo.fr>
References:  <4D9B3403.2070704@yahoo.fr>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help

On Apr 5, 2011, at 11:23 AM, Michael Gr=FCnewald wrote:

> Dear FreeBSD users,
>=20
>=20
> today I come to you with what seems to be somehow pedantic question:  =
where is the best place to install libraries of shell functions.
>=20
> I read hier(4) carefully and it seems the correct place for this would =
be somewhere under `/usr/local/share':
>=20
>                share/    architecture-independent files
>=20
>=20
> 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.
>=20
> 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:
>=20
> > find /usr/local/lib -name '*.sh'
> /usr/local/lib/tk8.5/tkConfig.sh
> /usr/local/lib/seamonkey/run-mozilla.sh
> /usr/local/lib/libxul/run-mozilla.sh
> /usr/local/lib/rpm/convertrpmrc.sh
> /usr/local/lib/rpm/find-lang.sh
> /usr/local/lib/rpm/getpo.sh
> /usr/local/lib/rpm/u_pkg.sh
> /usr/local/lib/rpm/vpkg-provides.sh
> /usr/local/lib/rpm/vpkg-provides2.sh
> /usr/local/lib/firefox/run-mozilla.sh
> /usr/local/lib/tcl8.5/tclConfig.sh
> /usr/local/lib/thunderbird/run-mozilla.sh
> =
/usr/local/lib/llvm-gcc-2.8/gcc/x86_64-portbld-freebsd8.2/4.2.1/install-to=
ols/fixinc.sh
>=20
> Two files (the `/usr/local/lib/tcl8.5/tclConfig.sh' 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'.
>=20
> 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.
> --=20
> Best Regards,
> Michael

For the bash library (http://jafdip.com/?p=3D537) we choose =
/usr/local/lib. This just seems to be the most logical place for this =
sort of thing.

Regards,
Mikel King
BSD News Network
http://bsdnews.net
skype: mikel.king
http://twitter.com/mikelking






Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?0434933C-E308-4D77-8180-21E90B7B23A8>