From 57adbc6eb1f961ee9116904b667f30efb3f2de4f Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Wed, 23 Aug 2023 18:56:31 +0100 Subject: unify err functions across scripts include/err.sh this new handling also does mundane things, such as tell you what script b0rked Signed-off-by: Leah Rowe --- include/err.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 include/err.sh (limited to 'include') diff --git a/include/err.sh b/include/err.sh new file mode 100755 index 00000000..ea46ccb3 --- /dev/null +++ b/include/err.sh @@ -0,0 +1,8 @@ +# Copyright (c) 2022, 2023 Leah Rowe +# SPDX-License-Identifier: MIT + +err() +{ + printf "ERROR %s: %s\n" "${0}" "${1}" 1>&2 + exit 1 +} -- cgit v1.2.1