2023-02-22 21:41:54 -06:00
|
|
|
# Don't want subsequent commands to run after nonzero exit? Wrappy in happy!
|
2023-05-04 14:38:30 -05:00
|
|
|
unhappy_ending() {
|
|
|
|
|
stat=$1; shift
|
|
|
|
|
(echo "Error while running: \"$@\"" >&2)
|
|
|
|
|
exit $stat
|
|
|
|
|
}
|
|
|
|
|
happy() { $@ || unhappy_ending $? $@; }
|