From 313af0413f261cf952966a25365cd38815da7c70 Mon Sep 17 00:00:00 2001 From: Mark Michaelis Date: Mon, 10 Mar 2025 21:14:01 +0100 Subject: [PATCH 1/7] docs: Update README.md Add `lib_gnucompat` library to description. --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 9a7b0af..5bcc33c 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,20 @@ ${COLOR_YELLOW}This is yellow text.${COLOR_RESET} EOF ``` +### lib_gnucompat + +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`. + +**Usage Examples**: + +```bash +echo "Hello, World!" | \ + "${SED}" --regexp-extended "s/World/GNU/g" +``` + ### lib_init Apply general recommended strictness settings for Bash scripts. Includes support From 915338813de65acb4d73ec4acbfb7c9bc5b563c4 Mon Sep 17 00:00:00 2001 From: Mark Michaelis Date: Wed, 12 Mar 2025 19:00:15 +0100 Subject: [PATCH 2/7] refactor(docs): Move Header Image Moving Header Image to docs/ folder, so that we can reuse it for the generated documentation. --- README.md | 2 +- {img => docs/img}/LibBashGitHubSocialPreview.jpg | Bin 2 files changed, 1 insertion(+), 1 deletion(-) rename {img => docs/img}/LibBashGitHubSocialPreview.jpg (100%) diff --git a/README.md b/README.md index 5bcc33c..a2a3564 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # lib-bash – Bash Libraries -![Lib-Bash Decorative Image](img/LibBashGitHubSocialPreview.jpg) +![Lib-Bash Decorative Image](docs/img/LibBashGitHubSocialPreview.jpg) A set of libraries to use from within your Bash scripts. diff --git a/img/LibBashGitHubSocialPreview.jpg b/docs/img/LibBashGitHubSocialPreview.jpg similarity index 100% rename from img/LibBashGitHubSocialPreview.jpg rename to docs/img/LibBashGitHubSocialPreview.jpg From 9be6840015a052a958596e28da86cf687888c81a Mon Sep 17 00:00:00 2001 From: Mark Michaelis Date: Wed, 12 Mar 2025 19:01:43 +0100 Subject: [PATCH 3/7] ci(github): Create Scripts to Generate Docs Generate (rather simple) scripts to generate documentation from the library-files. --- bin/doc-single.sh | 51 +++++++++++++++++++++++++++++++++++++++++++++++ bin/docs.sh | 42 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100755 bin/doc-single.sh create mode 100755 bin/docs.sh diff --git a/bin/doc-single.sh b/bin/doc-single.sh new file mode 100755 index 0000000..49c759f --- /dev/null +++ b/bin/doc-single.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash +### +### Script to generate Markdown documentation for a single script. +### +### In contrast to more sophisticated approaches, this script just generates +### the Markdown from lines starting with three hashes (###) and the following +### line. +### +### Usage: +### +### ```bash +### doc-single.sh