diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-10-02 15:32:45 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-10-02 15:32:45 -0400 |
commit | f5b650a06cddd447ad7a75330e9e9c6baf23ccc4 (patch) | |
tree | 8be9f443b7056a9c08beb37fce490e99d1ea26a1 /src/lib/librelib.1.ronn | |
parent | 86ee0a5da2a3a02d291ae40c8570bcd97ff066de (diff) |
Add documentation for lib/
* Add a bunch of man-pages
* Add some comments to conf.sh
* Add more information to librelib:usage()
Diffstat (limited to 'src/lib/librelib.1.ronn')
-rw-r--r-- | src/lib/librelib.1.ronn | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/src/lib/librelib.1.ronn b/src/lib/librelib.1.ronn new file mode 100644 index 0000000..42d8f15 --- /dev/null +++ b/src/lib/librelib.1.ronn @@ -0,0 +1,55 @@ +librelib(1) -- finds a Bash library file +======================================== + +## SYNOPSIS + +`. $(librelib LIBRARY)`<br> +`librelib -h` + +## DESRIPTION + +`librelib` is a program to find a Bash(1) library file at run-time. +This way, the path does not need to be hard-coded into the +application; think of it as a sort of dynamic-linker for shell +programs. + +There are several reasons for doing this, instead of hard-coding the +path: + + * The install path can change in the future without having to change + programs that use them. + * The install directory can be configured at runtime, by setting + `LIBRETOOLS_LIBDIR`, similar to `LD_PRELOAD` (this is used when + running the test suite). + * The naming scheme of a library can change (such as between + `libreNAME` and `NAME.sh` without changing programs that use it. + +By default, `librelib` looks in `/usr/lib/libretools`, but that can be +changed by setting the `LIBRETOOLS_LIBDIR` environmental variable to +the directory it should look in. + +When searching for a library, `librelib` first strips `libre` from the +beginning of the name, and `.sh` from the end. This means that all of +the following are equivalent: + + . $(librelib messages) + . $(librelib messages.sh) + . $(librelib libremessages) + . $(librelib libremessages.sh) + +Once it has the 'base' name of the library it is looking for, it looks +for a file with that 'base' name (allowing for, but not requiring +`libre` to be prepended, or `.sh` to be appended) in whichever +directory it is looking in. + +If it cannot find a suitable library file, it will print an error +message to standard error, and exit with a code of 1. + +## Examples + + . $(librelib messages) + . $(librelib conf) + +## SEE ALSO + +librelib(7) |