mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
helpers: simplify --time display option for ynh_script_progression .. we don't care about displaying time when below 10 sc
This commit is contained in:
parent
756b0930c2
commit
8731f77aa9
1 changed files with 2 additions and 2 deletions
|
@ -308,8 +308,8 @@ ynh_script_progression() {
|
|||
local progression_bar="${progress_string2:0:$effective_progression}${progress_string1:0:$expected_progression}${progress_string0:0:$left_progression}"
|
||||
|
||||
local print_exec_time=""
|
||||
if [ $time -eq 1 ]; then
|
||||
print_exec_time=" [$(date +%Hh%Mm,%Ss --date="0 + $exec_time sec")]"
|
||||
if [ $time -eq 1 ] && [ "$exec_time" -gt 10 ]; then
|
||||
print_exec_time=" [$(bc <<< 'scale=1; 12345 / 60' ) minutes]"
|
||||
fi
|
||||
|
||||
ynh_print_info "[$progression_bar] > ${message}${print_exec_time}"
|
||||
|
|
Loading…
Add table
Reference in a new issue