distributed under GPL


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


What is kal-shlib ?

It's a shell lib: it provides functions to help coding shell
scripts. They are written for bash, and have worked on busybox
compiled for ash support.

It's in a pre-alpha support, and will probably never reach higher support
level. In other words, these are extremely usefull for my local work but
isn't revolutional, so I'll keep it stable enough to scratch my itch.

The shell lib component contains the core libraries that I've written
that ease some common tasks in shell scripts. I was looking at
reducing my programming time and enhance the quality of my shell
code. Well I no this have its limits. It remains shell scripts.

Do I need shlibs ?

If you take time shell-scripting, this might be of interest. It has, and
continue to save time regularly since several years.

If you have found an utility for other component of the kal 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 kal 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 kal package.

How can install it ?

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

Nevertheless, 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/shlib/
- 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.

You can revert back and forth between these two command provided that you have followed the strange rules of the double "#!- " lines.
Contact meKalysto -- Personnal Work Web site - Copyright © 2012  LAB  Valentinmirrors :