Current status: Work in progress; most of the functionality is tested and safe to use. Lacks documentation.
A set of curated bash formula, ready to consume. It provides a simplistic module loading with dependency management and support for loading variants of modules based on bash version.
Below are the current set of modules provided. For information on functions provided by each of them, please have a look inside.
NOTE: The function documentation is similar to what is prescribed by google, but in a minimised form.
Example:
# Check major version of bash to be at least a given number # # Arguments: # 1. major_version version to check against # # Returns: # 0 if greater than or equal to major_version, otherwise 1 is_bash_version() { ... }
Bug reports, feature requests, commentary, and pull requests; they all count. Please do feel free to fork and make changes.
If you would like your changes to be merged back, please follow the below basic rules.
-
All major changes must be accompanied by an issue. For typos and trivial updates, I am happy to over look that.
-
All changes must pass a shellcheck.
-
More documentation the merrier; especially functions. If they are hard to use, do provide an example.
-
All changes must be accompanied by appropriate tests.
-
All changes must be bash 3.2+ compatible.
I dont have access to bash 3.2+; how do I test it?
A Linux distro version to ship with v3.2 is CentOS 5. You can use a VM or docker to perform these tests. If you choose the latter, the formula to run can be.
docker run --rm -it \ -v $(pwd):/bash-pack \ -w /bash-pack \ centos:5 sh /bash-pack/run-tests.sh
Copyright (c) 2017 Dino Korah