From a08d72b21c4f846aaede65991ebcef2599ed8d62 Mon Sep 17 00:00:00 2001 From: Stephan Geisler Date: Sat, 22 Aug 2020 14:18:19 +0000 Subject: [PATCH] =?UTF-8?q?=E2=80=9EBuild/synOTR.sh=E2=80=9C=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Build/synOTR.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Build/synOTR.sh b/Build/synOTR.sh index baf1e7f..5dd7b12 100644 --- a/Build/synOTR.sh +++ b/Build/synOTR.sh @@ -293,6 +293,20 @@ ################################################################################################# +set -eE -o functrace + +failure() +{ +# this function show error line +# -------------------------------------------------------------- + # https://unix.stackexchange.com/questions/462156/how-do-i-find-the-line-number-in-bash-when-an-error-occured + local lineno=$1 + local msg=$2 + echo "Failed at $lineno: $msg" +} +trap 'failure ${LINENO} "$BASH_COMMAND"' ERR + + sec_to_time() { #########################################################################################