kvz / bash3boilerplate

Templates to write better Bash scripts
http://bash3boilerplate.sh
MIT License
2.12k stars 198 forks source link

Check if non-bash shell is executing script? #100

Open gdevenyi opened 6 years ago

gdevenyi commented 6 years ago

We use lots of bashisms, for good reason.

Perhaps we should check and bail out if a non-bash shell is running the script?

One way to check: https://askubuntu.com/questions/97522/how-can-my-script-determine-whether-its-being-run-by-bash-or-dash

kvz commented 6 years ago

Yes I like it! And if people want to force it, they can just run with BASH_VERSION=force or similar