From aef57666e81afbbb5bb873c2b7ac3d4440e6394f Mon Sep 17 00:00:00 2001 From: vanhofen Date: Thu, 17 Dec 2020 23:41:53 +0100 Subject: [PATCH] - change makelog script; thx Janus --- makelog | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/makelog b/makelog index 4996bb97..d6522a88 100755 --- a/makelog +++ b/makelog @@ -6,14 +6,17 @@ usage() { echo "Usage: makelog ..." } -test "$1" == "--help" && { usage; exit 0; } -test -z "$1" && { usage; exit 1; } +if [ -z "$1" -o "$1" == "--help" ]; then + usage + exit 0 +fi logfile=$(mktemp makelog.XXXXXX) trap "rm -f $logfile" EXIT -time make $* 2>&1 | tee $logfile +params="$*" +time make $params 2>&1 | tee $logfile mkdir -p build_tmp -echo -e "\nmake $*:\n" >> build_tmp/make.log -cat $logfile >> build_tmp/make.log +echo -e "\nmake $*:\n" >> build_tmp/make_${params// /_}.log +cat $logfile >> build_tmp/make_${params// /_}.log