From ad6e1a9d59fc7de999fa0c13b1b89e8382329691 Mon Sep 17 00:00:00 2001 From: Julio Montes Date: Mon, 25 Mar 2019 08:19:13 -0600 Subject: [PATCH] scripts: implement error function Implement function to log errors without exit. Signed-off-by: Julio Montes --- scripts/lib.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/lib.sh b/scripts/lib.sh index d725a7751..b2f680e5f 100644 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -6,10 +6,15 @@ set -e -die() +error() { local msg="$*" echo "ERROR: ${msg}" >&2 +} + +die() +{ + error "$*" exit 1 }