summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@nomic.retiolum>2013-11-14 12:48:55 +0100
committertv <tv@nomic.retiolum>2013-11-14 12:50:01 +0100
commitc27074f54f30b5d2acc870479ef76d303e46d88e (patch)
treeecc546c6abe4af40f444ff7d2d500f9359b333ac
parenta2eb765dd873ea34fd491c6ab0a64ba9d77262e9 (diff)
ship core die: make reason optional
-rw-r--r--ship/lib/core3
1 files changed, 2 insertions, 1 deletions
diff --git a/ship/lib/core b/ship/lib/core
index 7c5cbf46..d6e01352 100644
--- a/ship/lib/core
+++ b/ship/lib/core
@@ -2,8 +2,9 @@
msg() { echo "$*" >&2; }
info() { msg "** $*"; }
error() { msg "!! $*"; }
+## usage: die [REASON...]
die() {
- error "$*"
+ test $# -gt 0 && error "$*"
error 'Bailing out.'
exit 1
}