From: Michael Tremer Date: Fri, 5 May 2017 12:10:36 +0000 (+0200) Subject: make.sh: Show last lines of log when build aborts X-Git-Tag: v2.19-core111~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3f9ecfdc27263ed0c419a3500112411f5c07b08c;p=ipfire-2.x.git make.sh: Show last lines of log when build aborts Signed-off-by: Michael Tremer --- 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