From 320691f312287575140bde777a11035166fc53a0 Mon Sep 17 00:00:00 2001 From: Einhard Leichtfuß Date: Sun, 22 Dec 2024 04:08:55 +0100 Subject: Initial commit The basic.bash script is based on the one used in `github.com:lawandorga/laworga-mail-server.git`, and other versions used by me (which the `lawandorga-mail-server.git` one was based upon). The notes are generally new, but many of them just a consolidation and refinement of existing knowledge (of mine). --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 README.md (limited to 'README.md') diff --git a/README.md b/README.md new file mode 100644 index 0000000..f495b5b --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ +# Basic bash "library" + +* The idea of this is to provide basic convenience settings in a Bash script. + + +## How to use + +* Install `src/basic.bash` to `/path/to/basic.bash.` +* At the very beginning of a script (after the shebang): + `include /path/to/basic.bash || exit 1` +* If a script includes other libraries, these should be included after + `basic.bash`, which will then also apply to those. +* The `basic.bash` library should not be included in other libraries, except + when these are meant as wrappers of `basic.bash`, providing additional + functionality. + * I.e., `basic.bash` should not be included more than once (while it + should be safe to do so). +* Alternatively, one could also copy the content of `basic.bash` to the top + (after the shebang) of a script. + + +## Semantics + +* See [basic.bash](src/basic.bash) and [Error handling](doc/error-handling.md). -- cgit v1.2.3