Skip to content

Commit 2bbf5ea

Browse files
committed
docs(README): Write usage instructions
Signed-off-by: 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>
1 parent 583cb71 commit 2bbf5ea

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,24 @@ A collection of commonly used Bash functions to make your scripts cleaner and mo
77

88
\#bash \#functions \#library \#bash-library
99

10+
## How to use
11+
12+
Refer to the following instructions on how to make use of this product:
13+
14+
1. Download the release package from [the Releases page](https://gitlab.com/the-common/bash-functions/-/releases).
15+
1. Extract the package.
16+
1. Include [the functions.sh file](functions.sh) in your project directory.
17+
1. Source the `functions.sh` file in your Bash scripts where you want to use the functions. For example:
18+
19+
```bash
20+
#!/usr/bin/env bash
21+
22+
if ! source /path/to/functions.sh; then
23+
printf 'Error: Failed to load the common functions.\n' >&2
24+
exit 1
25+
fi
26+
```
27+
1028
## Licensing
1129

1230
Unless otherwise noted([comment headers](https://reuse.software/spec-3.3/#comment-headers)/[REUSE.toml](https://reuse.software/spec-3.3/#reusetoml)), this product is licensed under [the 4.0 International version of the Creative Commons Attribution-ShareAlike license](https://creativecommons.org/licenses/by-sa/4.0/), or any of its more recent versions of your preference.

0 commit comments

Comments
 (0)