From 3f9ecfdc27263ed0c419a3500112411f5c07b08c Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Fri, 5 May 2017 14:10:36 +0200 Subject: [PATCH] make.sh: Show last lines of log when build aborts Signed-off-by: Michael Tremer --- tools/make-functions | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/make-functions b/tools/make-functions index d5f0a71262..49e8fba62c 100644 --- a/tools/make-functions +++ b/tools/make-functions @@ -310,6 +310,16 @@ exiterror() { losetup -d /dev/loop${i} 2>/dev/null fi; done + + if [ -n "${LOGFILE}" ]; then + echo # empty line + + local line + while read -r line; do + echo " ${line}" + done <<< "$(tail -n30 ${LOGFILE})" + fi + echo -e "\nERROR: $*" echo " Check $LOGFILE for errors if applicable" exit 1 -- 2.39.2