Skip to content

Commit 0dad96d

Browse files
committed
Fix script not keeping up with log
1 parent 0b6c462 commit 0dad96d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,13 +663,20 @@ umu_launch "$INPUT_INSTALLER" \
663663
"$([ "$VERYSILENT" -eq 1 ] && printf "/VERYSILENT")" &
664664

665665
# Watch the install log
666+
_currentfile=0
667+
_filecount=$(("$(get_header_val 'file_count')"+"$(get_header_val 'icon_count')"))
666668
_readlog=1
667669
while [ $_readlog -eq 1 ]; do
668670
sleep 0.010
669671
while read -r line || [ -n "$line" ]; do
670672
case $line in
671673
*"Dest filename: "*)
672-
show_log_file_line "$line" "$(get_header_val 'default_dir_name')"
674+
# show_log_file_line "$line" "$(get_header_val 'default_dir_name')" # too slow
675+
_currentfile=$((_currentfile+1))
676+
printf "\r\e[K\033[33m[\033[35mzoom-platform.sh\033[33m]\033[0m: Extracting: %d/%d [%.2f%%]" \
677+
$_currentfile \
678+
$_filecount \
679+
"$(printf 'x=(%d/%d)*100; if(x<1 && x > 0) print 0; x\n' $_currentfile $_filecount | bc -l)"
673680
;;
674681
*"Exception message"* | *"Got EAbort exception"*)
675682
_readlog=0

0 commit comments

Comments
 (0)