7 lines
212 B
Bash
7 lines
212 B
Bash
# Don't want subsequent commands to run after nonzero exit? Wrappy in happy!
|
|
unhappy_ending() {
|
|
stat=$1; shift
|
|
(echo "Error while running: \"$@\"" >&2)
|
|
exit $stat
|
|
}
|
|
happy() { $@ || unhappy_ending $? $@; }
|