Skip to content

Commit 57190a3

Browse files
committed
docs: feat: Write the flavors section of the README
Signed-off-by: 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
1 parent 94a375b commit 57190a3

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

+23
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,29 @@ Ready-to-use bash shell script templates at your fingertips!
55
<https://gitlab.com/the-common/bash-script-templates>
66
[![The GitLab CI pipeline status badge of the project's `main` branch](https://gitlab.com/the-common/bash-script-templates/badges/main/pipeline.svg?ignore_skipped=true "Click here to check out the comprehensive status of the GitLab CI pipelines")](https://gitlab.com/the-common/bash-script-templates/-/pipelines) [![GitHub Actions workflow status badge](https://github.com/the-common/bash-script-templates/actions/workflows/check-potential-problems.yml/badge.svg "GitHub Actions workflow status")](https://github.com/the-common/bash-script-templates/actions/workflows/check-potential-problems.yml) [![pre-commit enabled badge](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white "This project uses pre-commit to check potential problems")](https://pre-commit.com/) [![REUSE Specification compliance badge](https://api.reuse.software/badge/gitlab.com/the-common/bash-script-templates "This project complies to the REUSE specification to decrease software licensing costs")](https://api.reuse.software/info/gitlab.com/the-common/bash-script-templates)
77

8+
## Flavors
9+
10+
This product provides several _flavors_ of the Bash script template to satisfy different needs:
11+
12+
### [PRIMITIVE](primitive.sh)
13+
14+
The considered to be the bare-minimum for bash scripting:
15+
16+
* Shebang/Hashbang file header
17+
* Script description and copyright declaration header
18+
* Defensive interpreter behavior settings
19+
20+
### [BASIC](basic.sh)
21+
22+
Inherited from the [PRIMITIVE](#primitive) flavor, but with the following additions:
23+
24+
* Runtime dependency detection(check whether all the required commands are available from the command search PATHs
25+
* The following convenience variable definitions:
26+
+ `script`: The absolute path of the shell script
27+
+ `script_dir`: The absolute path of the directory that contains the shell script
28+
+ `script_filename`: The full filename of the shell script
29+
+ `script_name`: The name of the shellscript, excluding the filename suffixes
30+
831
## References
932

1033
* [The Common / The Common GNU Bash Shell Script Templates · GitLab](https://gitlab.com/the-common/bash-script-templates)

0 commit comments

Comments
 (0)