diff --git a/compile.sh b/compile.sh index 6e83a35565..32f9ffa6b4 100755 --- a/compile.sh +++ b/compile.sh @@ -20,6 +20,13 @@ grep -q "[[:space:]]" <<<"${SRC}" && { echo "\"${SRC}\" contains whitespace. Not cd "${SRC}" || exit +if [[ "${ARMBIAN_ENABLE_CALL_TRACING}" == "yes" ]]; then + set -T # inherit return/debug traps + mkdir -p "${SRC}"/output/debug + echo -n "" > "${SRC}"/output/debug/calls.txt + trap 'echo "${BASH_LINENO[@]}|${BASH_SOURCE[@]}|${FUNCNAME[@]}" >> ${SRC}/output/debug/calls.txt ;' RETURN +fi + if [[ -f "${SRC}"/lib/general.sh ]]; then # shellcheck source=lib/general.sh