mirror of
https://github.com/kvz/bash3boilerplate.git
synced 2025-03-14 15:46:25 +00:00
Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
2e878ec30f | ||
|
726ce78de7 | ||
|
51e7644bb1 | ||
|
985b0046c4 | ||
|
38f269c660 | ||
|
f6b61410c0 | ||
|
42e50f66c8 | ||
|
c5012d0190 | ||
|
14421bd791 | ||
|
7af1f75c5e | ||
|
320609fceb | ||
|
9e70d61133 | ||
|
354c304b19 | ||
|
a6a2d961ae | ||
|
7f9a31f8d8 | ||
|
758fa92f05 | ||
|
555beb1add | ||
|
2d145e24e9 |
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -21,6 +21,8 @@ jobs:
|
||||
run: |
|
||||
corepack yarn
|
||||
- name: Lint
|
||||
env:
|
||||
SHELLCHECK_SEVERITY: warning
|
||||
run: |
|
||||
corepack yarn lint
|
||||
- name: Test
|
||||
|
16
CHANGELOG.md
16
CHANGELOG.md
@ -11,9 +11,23 @@ Unplanned.
|
||||
## main
|
||||
|
||||
Released: TBA.
|
||||
[Diff](https://github.com/kvz/bash3boilerplate/compare/v2.4.2...main).
|
||||
[Diff](https://github.com/kvz/bash3boilerplate/compare/2.7.2...main).
|
||||
|
||||
- [ ]
|
||||
|
||||
## 2.7.2
|
||||
|
||||
Released: 2023-08-29
|
||||
[Diff](https://github.com/kvz/bash3boilerplate/compare/v2.4.1...2.7.2).
|
||||
|
||||
- [x] Upgrade and cleanup node dependencies
|
||||
- [x] Remove lanyon-based website in favor of simple redirect to github for bash3boilerplate.sh
|
||||
- [x] Make tests pass again
|
||||
- [x] Make linting and style checking separate actions
|
||||
- [x] Add feature to edit/update comments in ini file (#132, @rfuehrer)
|
||||
- [x] Upgrade to `lanyon@0.1.16`
|
||||
- [x] Capture correct error_code in err_report (#124, @eval)
|
||||
- [x] Enhanced ini file handling: create new file, create new sections, handle default section, read key from given section (@rfuehrer)
|
||||
|
||||
## v2.4.2
|
||||
|
||||
|
18
README.md
18
README.md
@ -30,7 +30,7 @@ We call it "BASH3 Boilerplate" or b3bp for short.
|
||||
|
||||
## Goals
|
||||
|
||||
Delete-Key-**Friendly**. Instead of introducing packages, includes, compilers, etc., we propose using [`main.sh`](http://bash3boilerplate.sh/main.sh) as a base and removing the parts you don't need.
|
||||
Delete-Key-**Friendly**. Instead of introducing packages, includes, compilers, etc., we propose using [`main.sh`](https://bash3boilerplate.sh/main.sh) as a base and removing the parts you don't need.
|
||||
While this may feel a bit archaic at first, it is exactly the strength of Bash scripts that we should want to embrace.
|
||||
|
||||
**Portable**. We are targeting Bash 3 (OSX still ships
|
||||
@ -45,7 +45,7 @@ dependency.
|
||||
- Configuration by environment variables
|
||||
- Simple command-line argument parsing that requires no external dependencies. Definitions are parsed from help info, ensuring there will be no duplication
|
||||
- Helpful 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), as well as the [twelve-factor](http://12factor.net/) guidelines
|
||||
- Logging that supports colors and is compatible with [Syslog Severity levels](https://en.wikipedia.org/wiki/Syslog#Severity_levels), as well as the [twelve-factor](https://12factor.net/) guidelines
|
||||
|
||||
## Installation
|
||||
|
||||
@ -56,7 +56,7 @@ There are three different ways to install b3bp:
|
||||
Use curl or wget to download the source and save it as your script. Then you can start deleting the unwanted bits, and adding your own logic.
|
||||
|
||||
```bash
|
||||
wget http://bash3boilerplate.sh/main.sh
|
||||
wget https://bash3boilerplate.sh/main.sh
|
||||
vim main.sh
|
||||
```
|
||||
|
||||
@ -140,22 +140,22 @@ $ my_script some more args --blah
|
||||
## Who uses b3bp?
|
||||
|
||||
- [Transloadit](https://transloadit.com)
|
||||
- [OpenCoarrays](http://www.opencoarrays.org)
|
||||
- [Sourcery Institute](http://www.sourceryinstitute.org)
|
||||
- [Computational Brain Anatomy Laboratory](http://cobralab.ca/)
|
||||
- [OpenCoarrays](https://www.opencoarrays.org)
|
||||
- [Sourcery Institute](https://www.sourceryinstitute.org)
|
||||
- [Computational Brain Anatomy Laboratory](https://cobralab.ca/)
|
||||
- [Genesis Cloud](https://genesiscloud.com/)
|
||||
|
||||
We are looking for endorsements! Are you also using b3bp? [Let us know](https://github.com/kvz/bash3boilerplate/issues/new?title=I%20use%20b3bp) and get listed.
|
||||
|
||||
## Authors
|
||||
|
||||
- [Kevin van Zonneveld](http://kvz.io)
|
||||
- [Kevin van Zonneveld](https://kvz.io)
|
||||
- [Izaak Beekman](https://izaakbeekman.com/)
|
||||
- [Manuel Streuhofer](https://github.com/mstreuhofer)
|
||||
- [Alexander Rathai](mailto:Alexander.Rathai@gmail.com)
|
||||
- [Dr. Damian Rouson](http://www.sourceryinstitute.org/) (documentation, feedback)
|
||||
- [Dr. Damian Rouson](https://www.sourceryinstitute.org/) (documentation, feedback)
|
||||
- [@jokajak](https://github.com/jokajak) (documentation)
|
||||
- [Gabriel A. Devenyi](http://staticwave.ca/) (feedback)
|
||||
- [Gabriel A. Devenyi](https://staticwave.ca/) (feedback)
|
||||
- [@bravo-kernel](https://github.com/bravo-kernel) (feedback)
|
||||
- [@skanga](https://github.com/skanga) (feedback)
|
||||
- [galaktos](https://www.reddit.com/user/galaktos) (feedback)
|
||||
|
2
main.sh
2
main.sh
@ -7,7 +7,7 @@
|
||||
#
|
||||
# LOG_LEVEL=7 ./main.sh -f /tmp/x -d (change this for your script)
|
||||
#
|
||||
# Based on a template by BASH3 Boilerplate v2.4.1
|
||||
# Based on a template by BASH3 Boilerplate vv2.7.2
|
||||
# http://bash3boilerplate.sh/#authors
|
||||
#
|
||||
# The MIT License (MIT)
|
||||
|
@ -1,26 +1,25 @@
|
||||
{
|
||||
"name": "bash3boilerplate",
|
||||
"description": "Copypastable templates to write better bash scripts",
|
||||
"version": "2.5.0",
|
||||
"version": "2.7.2",
|
||||
"packageManager": "yarn@3.6.0+sha224.19e47520fa56c6146388fdeb438d9dcf6630c3f277a2e1180995c3bb",
|
||||
"engines": {
|
||||
"node": ">= 18",
|
||||
"yarn": "3.6.0"
|
||||
},
|
||||
"scripts": {
|
||||
"lint:shellcheck": "SEV=info; if [ \"${CI:-false}\" = \"true\" ]; then SEV=warning; fi; shellcheck --severity=${SEV} $(find . -name '*.sh' -maxdepth 2)",
|
||||
"lint:shellcheck": "shellcheck --severity=${SHELLCHECK_SEVERITY:-info} $(find . -name '*.sh' -maxdepth 2)",
|
||||
"lint:style": "test/style.pl $(find . -name '*.sh' -maxdepth 2)",
|
||||
"lint": "npm-run-all -l 'lint:**'",
|
||||
"release:major": "env SEMANTIC=major yarn release",
|
||||
"release:minor": "env SEMANTIC=minor yarn release",
|
||||
"release:patch": "env SEMANTIC=patch yarn release",
|
||||
"release": "npm version ${SEMANTIC:-patch} -m \"Release %s\" && yarn version:replace && git commit main.sh src/*.sh -m 'Update version' && git push && git push --tags && npm publish",
|
||||
"release": "npm version ${SEMANTIC:-patch} -m \"Release %s\" && yarn version:replace && git commit main.sh src/*.sh -m 'Update version' && git push && git push --tags -f && npm publish",
|
||||
"test:debug:main:repeated": "env LOG_LEVEL=7 test/acceptance.sh main-repeated",
|
||||
"test:update": "env SAVE_FIXTURES=true yarn test",
|
||||
"test": "test/acceptance.sh",
|
||||
"upgrade:modules": "next-update --keep true --tldr",
|
||||
"version:current": "node -e 'console.log(require(\"./package.json\").version)'",
|
||||
"version:replace": "replace 'v\\d+\\.\\d+\\.\\d+' \"v$(yarn --silent version:current)\" main.sh src/*.sh"
|
||||
"version:replace": "replace 'v\\d+\\.\\d+\\.\\d+' \"v$(npm run --silent version:current)\" main.sh src/*.sh"
|
||||
},
|
||||
"devDependencies": {
|
||||
"fakefile": "1.1.0",
|
||||
|
@ -19,7 +19,7 @@
|
||||
#
|
||||
# ini_val.sh data.ini connection.host 127.0.0.1 "Host name or IP address"
|
||||
#
|
||||
# Based on a template by BASH3 Boilerplate v2.4.1
|
||||
# Based on a template by BASH3 Boilerplate vv2.7.2
|
||||
# http://bash3boilerplate.sh/#authors
|
||||
#
|
||||
# The MIT License (MIT)
|
||||
|
@ -20,7 +20,7 @@
|
||||
#
|
||||
# megamount.sh smb://janedoe:abc123@192.168.0.1/documents /mnt/documents
|
||||
#
|
||||
# Based on a template by BASH3 Boilerplate v2.4.1
|
||||
# Based on a template by BASH3 Boilerplate vv2.7.2
|
||||
# http://bash3boilerplate.sh/#authors
|
||||
#
|
||||
# The MIT License (MIT)
|
||||
|
@ -18,7 +18,7 @@
|
||||
#
|
||||
# parse_url.sh 'http://johndoe:abc123@example.com:8080/index.html'
|
||||
#
|
||||
# Based on a template by BASH3 Boilerplate v2.4.1
|
||||
# Based on a template by BASH3 Boilerplate vv2.7.2
|
||||
# http://bash3boilerplate.sh/#authors
|
||||
#
|
||||
# The MIT License (MIT)
|
||||
|
@ -16,7 +16,7 @@
|
||||
#
|
||||
# ALLOW_REMAINDERS=1 templater.sh input.cfg output.cfg
|
||||
#
|
||||
# Based on a template by BASH3 Boilerplate v2.4.1
|
||||
# Based on a template by BASH3 Boilerplate vv2.7.2
|
||||
# http://bash3boilerplate.sh/#authors
|
||||
#
|
||||
# The MIT License (MIT)
|
||||
|
Loading…
x
Reference in New Issue
Block a user