From: Yann E. MORIN Date: Tue, 4 Jul 2017 21:53:15 +0000 (+0200) Subject: utils/brmake: print the error code of the build X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c8d8f74a939ac1381d7ac7dee356247f91347ace;p=buildroot.git utils/brmake: print the error code of the build Since the stdout and stderr streams are redirected, it is not immediately obvious when a build failed, even though brmake really exits with the same error code as make did. When there is an error, print the exit code after the elapsed time. Reported-by: Arnout Vandecappelle Signed-off-by: "Yann E. MORIN" Signed-off-by: Thomas Petazzoni --- diff --git a/utils/brmake b/utils/brmake index 3c6f8485ab..e30119dd10 100755 --- a/utils/brmake +++ b/utils/brmake @@ -29,7 +29,12 @@ main() { m=$((d/60)) d=$((d%60)) [ ${m} -eq 0 ] || { printf "%${mf}dmin " ${m}; sf="02"; } - printf "%${sf}ds\n" ${d} + printf "%${sf}ds" ${d} + + if [ ${ret} -ne 0 ]; then + printf " (error code: %s)" ${ret} + fi + printf "\n" return ${ret} }