Load shell libraries packages as git repositories
Allow loading of shell libraries packages provided in git repositories with a simple command as package.load github.com/vargiuscuola/shdoc
.
Use the command module.doc <function_name>
to see the documentation for a function (see an example)
- _PACKAGE__LIB_DIR (string)[default: /lib/sh in Linux or /c/linux-lib/sh in Windows]: shell libraries base path
Return the library base path.
- package.get-lib-dir_
Function has no arguments.
- Library dir path
$ package.get-lib-dir_
return> /lib/sh
Return the path of the provided package
- package.get-path_
- $1 (String): Name of the package (in the form of a git repository url without scheme)
$ package_get-path_ github.com/vargiuscuola/std-lib.bash
# return __=/lib/sh/github.com/vargiuscuola/std-lib.bash
- Path of the provided package
Update a git package from the repository remote.
- package.update
- $1 (String): Git repository url without scheme (https is used)
- Standard
$ package.update github.com/vargiuscuola/std-lib.bash
Check the consistency state of a package (through a git fsck
command on the related git repository).
- package.check
- $1 (String): Git repository url without scheme (https is used)
- Standard
$ package.check github.com/vargiuscuola/std-lib.bash
Load required package, cloning the git repository hosting it.
- package.load
- $1 (String): Git repository url without scheme (https is used)
- Standard
- Informative messages
- Error messages
$ package.load github.com/vargiuscuola/std-lib.bash