This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Taken from http://www.davidpashley.com/articles/writing-robust-shell-scripts.html | |
# abort when trying to use an unset variable | |
set -u # or set -o nounset | |
# exit on non-zero return codes from statements | |
# note: checking $? won't work any more, should use: | |
# command || { echo "command failed"; exit 1; } | |
set -e # or set -o errexit |