oehrlis / oudbase

OUD base environment scripts
Apache License 2.0
6 stars 1 forks source link

Improve bash script stability #85

Closed oehrlis closed 1 year ago

oehrlis commented 4 years ago

Define a bunch of bash option see https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html

set -o nounset          # stop script after 1st cmd failed
set -o errexit          # exit when 1st unset variable found
set -o pipefail         # pipefail exit after 1st piped commands failed
oehrlis commented 1 year ago

add bash set as mentioned for all scripts