From 653298b18acf81a6eaf9d7cd8bf27e9e7063e5e7 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Wed, 19 Feb 2020 10:24:15 +0000 Subject: [PATCH] buildsystem: allow onexit trap to be selectively ignored --- config/functions | 2 +- tools/dashboard | 2 ++ tools/distro-tool | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config/functions b/config/functions index ea8466aad6..6aa6781354 100644 --- a/config/functions +++ b/config/functions @@ -28,7 +28,7 @@ onexitcleanup() { fi fi } -trap "onexitcleanup $0 $@" EXIT +[ "${NOONEXIT}" != "yes" ] && trap "onexitcleanup $0 $@" EXIT # return 0 if $2 in space-separated list $1, otherwise return 1 listcontains() { diff --git a/tools/dashboard b/tools/dashboard index c401f6880d..b8d3af61e5 100755 --- a/tools/dashboard +++ b/tools/dashboard @@ -3,6 +3,8 @@ # SPDX-License-Identifier: GPL-2.0 # Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv) +export NOONEXIT=yes + cd "$(readlink -f "$(dirname "$0")")/.." export _CACHE_PACKAGE_LOCAL=none _CACHE_PACKAGE_GLOBAL=none _DEBUG_DEPENDS_LIST=none DEFAULT_PYTHON_VERSION=none diff --git a/tools/distro-tool b/tools/distro-tool index f763cd1328..651a310595 100755 --- a/tools/distro-tool +++ b/tools/distro-tool @@ -5,6 +5,8 @@ set -e +export NOONEXIT=yes + [ -z "${DEBUG_LOG}" ] && DEBUG_LOG=/tmp/distro-tool.log LIBREELEC_DIR=$HOME/LibreELEC.tv