ldbash
must answer 3 requirments:EXPORT=
. That line will contain (after the '='
) a list of fuctions that the library exports. I.e. all the function that will be usable after loading that library will be listed in that line.REQUIRE=
. That line will contain (after the '='
) a list of bash functions that are required for our library. I.e. every bash function that is in use in our bash library, and should be defined by another library, must be listed there.ldbashconfig
man page ).EXPORT=
) shoud begin with: __<library_name>_ For example, internal function myfoosort of hashstash library should be named as __hashstash_myfoosort
ldbash:
library loaderldbashconfig:
checks out available libraries, resolves cross-library dependencies and builds cache file.
As number of libraries grows, it may take considerable amount of time to scan them all and resolve dependencies. That is why this process is done by separate utility - ldbashconfig
. Afterwards, at runtime, ldbash
reads cache file and determinies which libraries it needs to load in order to satisfy dependencies for requested library.
Install steps:
<something>
.sh
$LIBBASH_PREFIX/lib/bash
(default is /usr/lib/bash
).ldbashconfig