diff options
author | 2024-10-13 21:33:23 -0400 | |
---|---|---|
committer | 2024-10-13 21:33:23 -0400 | |
commit | a20a7fb5ec93f1929479d38bd452e4dcdff31dca (patch) | |
tree | e55826b4cc5d354fc8a255b42f360d7b4e31368a /shell_utils.sh | |
parent | 49d943179fccbb35fa3de0d1f0aa9ab363db3c2d (diff) |
Fix printf usage in _wrap_build()
On some systems using floating-point instead of decimal results
in the build time being displayed as "nan:nan".
Test: m, "build completed successfully (02:26 (mm:ss))"
Change-Id: I7a2b401903b63117a7718cc5aa2a0d5610b57ca2
Diffstat (limited to 'shell_utils.sh')
-rw-r--r-- | shell_utils.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/shell_utils.sh b/shell_utils.sh index c4a67564c2..9053c42e75 100644 --- a/shell_utils.sh +++ b/shell_utils.sh @@ -178,11 +178,11 @@ function _wrap_build() echo -n "${color_failed}#### failed to build some targets " fi if [ $hours -gt 0 ] ; then - printf "(%02g:%02g:%02g (hh:mm:ss))" $hours $mins $secs + printf "(%02d:%02d:%02d (hh:mm:ss))" $hours $mins $secs elif [ $mins -gt 0 ] ; then - printf "(%02g:%02g (mm:ss))" $mins $secs + printf "(%02d:%02d (mm:ss))" $mins $secs elif [ $secs -gt 0 ] ; then - printf "(%s seconds)" $secs + printf "(%d seconds)" $secs fi echo " ####${color_reset}" echo |