]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
make.sh: Show last lines of log when build aborts
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 5 May 2017 12:10:36 +0000 (14:10 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 18 May 2017 10:49:27 +0000 (11:49 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
tools/make-functions

index d5f0a71262750a62a743314678c6159f9431b35a..49e8fba62cfd5e7ef005c336384bbae446e69b40 100644 (file)
@@ -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