Created
September 24, 2015 10:17
-
-
Save ffflorian/dc25a8f631598a75278e to your computer and use it in GitHub Desktop.
Three-Fingered Claw
This file contains 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://stackoverflow.com/questions/1378274/in-a-bash-script-how-can-i-exit-the-entire-script-if-a-certain-condition-occurs | |
yell() { echo "$0: $*" >&2; } | |
die() { yell "$*"; exit 111; } | |
try() { "$@" || die "cannot $*"; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Don't forget to 'exit 0' or 'true' at the end...
https://gist.github.com/dotike/8257326