Commit 7d9bf4ca authored by alex@thinkpad's avatar alex@thinkpad
Browse files

run_canon_fw.sh: only clear the terminal if running in interactive mode

https://serverfault.com/questions/146745/how-can-i-check-in-bash-if-a-shell-is-running-in-interactive-mode

--HG--
branch : qemu
parent c47039fc32b7
......@@ -54,10 +54,12 @@ fi
# recompile QEMU
$MAKE -C $QEMU_PATH || exit 2
# clear the terminal
# (since the logs are very large, being able to scroll at the beginning is helpful)
# note: "tput reset" may crash when running as a background job, figure out why
printf '\ec\e[3J'
if [ -t 1 ] ; then
# clear the terminal (only if running in interactive mode, not when redirected to logs)
# (since the logs are very large, being able to scroll at the beginning is helpful)
# note: "tput reset" may crash when running as a background job, figure out why
printf '\ec\e[3J'
fi
# print the invocation
# https://unix.stackexchange.com/a/118468
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment