Commit af1dfdeb authored by matze's avatar matze

New manpage for the library stuff

Added an own manpage for libraries. Also did some things around it ..
parent f2e589f2
Pipeline #2040 passed with stage
in 1 minute and 3 seconds
Library
=======
Description
-----------
The library features the sharing of common code. There is a global and
a type library to match the specific use case.
The library feature is simply making the path to the library folder
available to all scripts. With it, they can load files out of the library
from different locations. Through it, code must only written once, which
makes code easier and less redundant. Also, better code can be provided
by shared libraries.
Synopsis
--------
From `manifest`, `gencode-*` and `code-local`:
.. code-block::
$__library (global library directory path)
$__type/library (type library folder)
From the remote side (`explorer` and `code-remote`):
.. code-block::
$__library (remote copied library directory path)
$__type_library (remote copied type library folder)
*Type libraries are only available if the code is available in an object-
realated content. As example, there are not available in global explorer
or the initial manifest.*
How to use
----------
Because the library features only distribute files, it's not bond to
`posix shell scripts` or any programming or scripting language. To use
the library, you only need to load the library from the given path.
In shell scripts, it works as follow (here as a `type manifest`):
.. code-block:: sh
# loading a global library
. "$__library/manifest"
# loading type library
. "$__type/library/foo-bar"
# now, sourced shell functions can be used
# ...
Remote handling
---------------
The libraries may also required on the remote side. For this, the
library is completly copied to the remote. Therefor, it's completly
available on the remote side and can be used in the explorers and
generated remote code.
......@@ -106,6 +106,7 @@ A type consists of
- explorer (optional)
- gencode (optional)
- nonparallel (optional)
- library (optional)
Types are stored below cdist/conf/type/. Their name should always be prefixed with
two underscores (__) to prevent collisions with other executables in $PATH.
......
......@@ -30,6 +30,7 @@ It natively supports IPv6 since the first release.
cdist-type
cdist-types
cdist-explorer
cdist-library
cdist-messaging
cdist-parallelization
cdist-inventory
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment