en | fr
distributed under GPL


Download(Download Area)
INSTALL(Install Instructions)
COPYING(Licence terms)


What is vlfs-shlib ?

This might or might not interest you as it was a personnal solution for
my LFS (http://www.linuxfromscratch.org) scripts. 'vlfs' stand for "Valentin
Linux From Scratch", and "shlib" for "shell libs".

This part of vlfs packages, is the shell libs content. They are written for
bash, and have worked one time on busybox compiled for ash support, this
might need some review today.

The shell lib component contains the core libraries that I've written that
ease a lot some common tasks I use when scripting in bash. I was looking at
reducing my programming time AND enhance the quality of my code. There's
a lot to be done.

Do I need shlibs ?

If you take time shell-scripting, this might be of interest, some function have
actually saved me lot of time.

If you have found an utility for other component of the vlfs packages, you can
save place by making all binaries dynamically linked to these libraries. This
is especially usefull if you have installed more than one vlfs package.

Where can I find Docs ?

There are very few docs at the moment. Best of all is to look at libraries
source code and other binaries source code from a vlfs package.

How can install it ?

Consider this release as Very Alpha. Use at your own risk. It may or may not
upgrade to a more user friendly version in future, depending on my spare time.

Nethertheless, this package support GNU install quite well so a simple :

./configure && make && make install

Should work (and has been tested and is currently used).

Note : you can specify a '--prefix=/your/location'

What does contain this package ?

- Libraries which are files called 'lib*.sh' installed in $prefix/lib/vlfs/
- an executable 'shlib' installed in $prefix/bin
- a config file 'shlib' installed in $prefix/etc

How can I use the librarie facility in one of my scripts ?

You should insert something like that before any other shell code :

#!- shlib loader

Note that there two '#!- ' at the beginning of line. These FOUR caracters are
important (yes there's FOUR caracters, DO NOT FORGET THE SPACE). You can put
any comment after. These 2 lines will mark the beginning and ending of the
shlib call. Notice that you shouldn't write the code between the two lines
yourself unless you understand the following :

The shlib call is meant to call a 'source $prefix/etc/shlib'. To generate
automagically this call for your config, you can use the 'shlib' executable :

# shlib <filename>

will do some checks, and if all checks succeeded, it'll output the actual
shlib loader code. (that is in between the to lines beginning with '#!- ')

# shlib d <filename>

will ERASE and write a DYNAMICAL version of the shlib caller. This means
that your shell script will look for the libraries at each call.

# shlib s <filename>

will ERASE and write a STATICAL version of the shlib caller. It makes a
snapshot of your current libraries and feeds it IN your script.

Contact meKalysto -- Personnal Work Web site - Copyright © 2007  LAB  Valentinmirrors :  chez.com | free.fr | kalysto.org