Add pipefail, oneline example, shellcheck to README
icetbr opened this issue · 3 comments
don't mean to !/bin/bash
, but...
- !/bin/bash
superset of sh, is a bit more programmer friendly, having associative arrays and support for pipefail - !/bin/sh
POSIX compatible, runs on more flavors of UNIX, not really a big deal nowadays - !/usr/bin/env bash
not needed, but fine see https://stackoverflow.com/questions/16365130/what-is-the-difference-between-usr-bin-env-bash-and-usr-bin-bash
use the pipefail Luke!
- better error handling, see https://mobile.twitter.com/b0rk/status/1314345978963648524
set -euo pipefail
kool kids do it in one line, add an example, THE ENDING ;
is REQUIRED
deploy() { echo "I am ${FUNCNAME[0]}ing in one line!"; }
for the README
shellcheck yourself before you wreck yourself
a linter for bash scripts
https://marketplace.visualstudio.com/items?itemName=timonwong.shellcheck
some nice tips
https://bertvv.github.io/cheat-sheets/Bash.html
a good Make write up
make has a nice auto detection of files changed, and will only build what has changed
https://spin.atomicobject.com/2021/03/22/makefiles-vs-package-json-scripts/
my 1cent
npm run start
has a nagging delay of a few miliseconds, ./run.sh start does not, the article above shows an example
Well, I made my own, thank you for the inspiration!
hey @icetbr sorry somehow your contribution went under my radar. :( This was not on purpose.
Would be happy to collaborate with you, if you are up for it can add you as a maintainer.
Hello, thank you for your reply. I just gave do.sh a little touch up to suite my tastes, I expect everyone that uses it to do the same.
Does my version replace yours? Does do.sh user base find it better? I don't know. Maybe we wait other people input, and to to see if it gains more traction? Maybe just leave my comment here as a way to link both our projects?
I don't mean to take away the credit for "inventing" this idea by any means. I just want people to be aware of this.