From a20a7fb5ec93f1929479d38bd452e4dcdff31dca Mon Sep 17 00:00:00 2001 From: Alexander Koskovich Date: Sun, 13 Oct 2024 21:33:23 -0400 Subject: 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 --- shell_utils.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'shell_utils.sh') 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 -- cgit v1.2.3-59-g8ed1b