mirror of
https://github.com/kvz/bash3boilerplate.git
synced 2024-12-20 07:07:51 +00:00
Update README.md
This commit is contained in:
parent
4c256ed58d
commit
c71b6d14c4
24
README.md
24
README.md
@ -1,5 +1,3 @@
|
|||||||
# bash3boilerplate
|
|
||||||
|
|
||||||
When hacking up BASH scripts, I often find there are some
|
When hacking up BASH scripts, I often find there are some
|
||||||
higherlevel things like logging, configuration, commandline argument
|
higherlevel things like logging, configuration, commandline argument
|
||||||
parsing that:
|
parsing that:
|
||||||
@ -12,7 +10,24 @@ Here's an attempt to bundle those things in a generalized way so that
|
|||||||
they are reusable as-is in most of my (and hopefully your, if not ping
|
they are reusable as-is in most of my (and hopefully your, if not ping
|
||||||
me) programs.
|
me) programs.
|
||||||
|
|
||||||
An up to date [intro is found on my blog](http://kvz.io/blog/2013/02/26/introducing-bash3boilerplate/).
|
## Goals
|
||||||
|
|
||||||
|
Delete-key-friendly. I propose people use `main.sh` as a base and remove the
|
||||||
|
parts they don't need, rather than introducing a ton of packages, includes, compilers, etc.
|
||||||
|
|
||||||
|
Aiming for portability, I'm targeting Bash 3 (OSX still ships
|
||||||
|
with 3 for instance). If you're going to ask people to install
|
||||||
|
Bash 4 first, you might as well pick a more advanced language as a
|
||||||
|
dependency.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Structure
|
||||||
|
- Configuration by environment variables
|
||||||
|
- Configuration by command-line arguments (definitions parsed from help info,
|
||||||
|
so no duplication needed)
|
||||||
|
- Magic variables like `__file__` and `__dir__`
|
||||||
|
- Logging that supports colors and is compatible with [Syslog Severity levels](http://en.wikipedia.org/wiki/Syslog#Severity_levels)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@ -38,7 +53,6 @@ And constructed with the following guidelines:
|
|||||||
* New additions without breaking backward compatibility bumps the minor (and resets the patch)
|
* New additions without breaking backward compatibility bumps the minor (and resets the patch)
|
||||||
* Bug fixes and misc changes bumps the patch
|
* Bug fixes and misc changes bumps the patch
|
||||||
|
|
||||||
|
|
||||||
For more information on SemVer, please visit [http://semver.org](http://semver.org).
|
For more information on SemVer, please visit [http://semver.org](http://semver.org).
|
||||||
|
|
||||||
## Best practices
|
## Best practices
|
||||||
@ -76,7 +90,7 @@ $ my_script some more args --blah
|
|||||||
- [ ] `make build` system for generating custom builds
|
- [ ] `make build` system for generating custom builds
|
||||||
- [ ] tests & releases via Travis
|
- [ ] tests & releases via Travis
|
||||||
|
|
||||||
## Want to encourage development via sponsoring?
|
## Sponsoring
|
||||||
|
|
||||||
<!-- badges/ -->
|
<!-- badges/ -->
|
||||||
[![Gittip donate button](http://img.shields.io/gittip/kvz.png)](https://www.gittip.com/kvz/ "Sponsor the development of bash3boilerplate via Gittip")
|
[![Gittip donate button](http://img.shields.io/gittip/kvz.png)](https://www.gittip.com/kvz/ "Sponsor the development of bash3boilerplate via Gittip")
|
||||||
|
Loading…
Reference in New Issue
Block a user