- Corrected visualization of the gauge, no flickering now
This commit is contained in:
parent
c4af662147
commit
ddc71e0cf4
@ -168,12 +168,13 @@ create_armbian()
|
||||
# Sometimes reads the progress file while writing and only partial numbers (like 1 when is 15)
|
||||
prev_progress=${rsync_progress}
|
||||
rsync_progress=$(tail -n1 "${nsi_conn_progress}")
|
||||
if [[ -z ${rsync_progress} ]]; then
|
||||
rsync_progress=${prev_progress}
|
||||
fi
|
||||
if [ ${prev_progress} -gt ${rsync_progress} ]; then
|
||||
rsync_progress=${prev_progress}
|
||||
fi
|
||||
echo "${rsync_progress}" | \
|
||||
dialog --backtitle "$backtitle" --title " $title " --gauge "\n\n Transferring rootfs to $2 ($USAGE MB). \n\n \
|
||||
This will take approximately $(( $((USAGE/300)) * 1 )) minutes to finish. Please wait!\n\n" 11 80
|
||||
echo "${rsync_progress}"
|
||||
# finish the while if the rsync is finished
|
||||
rsync_done=$(cat ${nsi_conn_done})
|
||||
if [[ "${rsync_done}" != "no" ]]; then
|
||||
@ -189,7 +190,9 @@ create_armbian()
|
||||
sleep 0.5
|
||||
fi
|
||||
|
||||
done
|
||||
done | \
|
||||
dialog --backtitle "$backtitle" --title " $title " --gauge "\n\n Transferring rootfs to $2 ($USAGE MB). \n\n \
|
||||
This will take approximately $(( $((USAGE/300)) * 1 )) minutes to finish. Please wait!\n\n" 11 80
|
||||
|
||||
# run rsync again to silently catch outstanding changes between / and ${TempDir}/rootfs/
|
||||
dialog --title "$title" --backtitle "$backtitle" --infobox "\n Cleaning up ... Almost done." 5 40
|
||||
|
||||
Loading…
Reference in New Issue
Block a user