Change /dev/null to temp file to be Windows compatible

This commit is contained in:
stefanrueger
2024-02-27 15:00:22 +13:00
parent f088a9bc3f
commit cd41d2b4e2

View File

@@ -160,8 +160,7 @@ tmpfile=$(mktemp "$tmp/$progname.tmp.XXXXXX")
resfile=$(mktemp "$tmp/$progname.res.XXXXXX")
trap "rm -f $status $logfile $outfile $tmpfile $resfile" EXIT
devnull=/dev/null
[[ ! -w /dev/null ]] && devnull=$tmpfile
devnull=$tmpfile # Cannot use /dev/null as file in Windows avrdude
TIMEFORMAT=%R # time built-in only returns elapsed wall-clock time
elapsed=-1 # Global variable holding time of last execute command in seconds