A set of libraries to use from within your Bash scripts.
All libraries are meant to embedded in a similar way. The following applies best practices according to spellcheck:
MY_PATH="$(realpath "${BASH_SOURCE[0]}")"
SCRIPT_DIR="$(dirname "${MY_PATH}")"
readonly MY_PATH
readonly SCRIPT_DIR
readonly LIB_BASH_DIR="${SCRIPT_DIR}/lib_bash"
source "${LIB_BASH_DIR}/lib_<name>.sh"
For details, visit the GitHub Pages.
Utility functions for console output, similar to general logging requirements.
Also, containing a specialized cat
command supporting colored output.
Utility functions and dynamically defined constants for scripts preferring
(or requiring) GNU compatible tooling. Meant especially for systems such as
MacOS, to prefer GNU-Tools like coreutils
by preferring prefixed tools like
gsed
, gawk
.
Apply general recommended strictness settings for Bash scripts. Includes support
for DEBUG
environment variable at two stages: 1
enables debug logging, while
2
(or above) triggers script debugging.
Functions to provide information about your script.
Find below two possible installation scenarios, assuming, that you want to use this libraries from your own Git managed repository.
As an alternative, you may just download the archives containing the minimal set of files.
git submodule add https://github.com/mmichaelis/lib-bash.git lib-bash
git submodule update --init --recursive
# Add Subtree
git subtree add --prefix=lib-bash \
https://github.com/mmichaelis/lib-bash.git main --squash
# Update Subtree
git subtree pull --prefix=lib-bash \
https://github.com/mmichaelis/lib-bash.git main --squash
To build the GitHub Pages locally, follow these steps:
cd docs
bundle install
bundle exec jekyll serve --source ./ --destination ../_site
Regarding supported plugins, see:
This would not exist without help, including GitHub Copilot.
Other tools and applications, that helped me:
-
Favicon Generator - Text to Favicon - favicon.io
Used to generate first sketch of the
favicon.ico
. For reproducibility, here are the chosen configuration options: -
Favicon Generator: Create Custom Icons from Text | Favicon Maker
-
realfavicongenerator.net: Favicon Generator for perfect icons on all browsers
After recreating above sketches, adapted SVG directly and created favicon configuration using the RealFaviconGenerator.
-
Used to generate badges.