Browse Source

- change makelog script; thx Janus

master
vanhofen 4 years ago
parent
commit
aef57666e8
  1. 13
      makelog

13
makelog

@ -6,14 +6,17 @@ usage() {
echo "Usage: makelog <target>..." echo "Usage: makelog <target>..."
} }
test "$1" == "--help" && { usage; exit 0; } if [ -z "$1" -o "$1" == "--help" ]; then
test -z "$1" && { usage; exit 1; } usage
exit 0
fi
logfile=$(mktemp makelog.XXXXXX) logfile=$(mktemp makelog.XXXXXX)
trap "rm -f $logfile" EXIT trap "rm -f $logfile" EXIT
time make $* 2>&1 | tee $logfile params="$*"
time make $params 2>&1 | tee $logfile
mkdir -p build_tmp mkdir -p build_tmp
echo -e "\nmake $*:\n" >> build_tmp/make.log echo -e "\nmake $*:\n" >> build_tmp/make_${params// /_}.log
cat $logfile >> build_tmp/make.log cat $logfile >> build_tmp/make_${params// /_}.log

Loading…
Cancel
Save