Directory for Bash libraries to extend setuplib
functionality.
-
Files here are sourced on-demand by
setuplib
oninclude()
- It sources files at
SETUP_LIBS_DIR
, by default at$(dirname setuplib)/lib
- It sources files at
-
All function names must be prefixed to match the file name. Absolutely no exceptions!
- Makes it possible to track where a given function was defined. As a bonus it avoids collisions.
- No problem using cryptic names such as
nm
: the file header will have a description
-
Main files should be extensionless, so scripts can source using
include name
- Support files, not meant for the scripts, can have an extension,
such as
gvariant.py
used bygvariant
- Support files, not meant for the scripts, can have an extension,
such as
-
Libraries can also
include
other libraries, and many do. -
While we could use import guards to prevent multiple sourcing, we do not. This is Bash, not C. And performance is irrelevant for one-shot setup scripts.