mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-06-06 16:37:28 +08:00
Update progress.sh
This commit is contained in:
parent
4018eeadb4
commit
c5e39c47d2
@ -26,7 +26,7 @@ do
|
||||
bytes=$(du -sb "$file" | cut -f1)
|
||||
if (( bytes > 1000 )); then
|
||||
if [ -z "$total" ] || [[ "$total" == "0" ]]; then
|
||||
size=$(numfmt --to=iec --suffix=B "$bytes" | sed -r 's/([A-Z])/ \1/')
|
||||
size=$(formatBytes "$bytes")
|
||||
else
|
||||
size="$(echo "$bytes" "$total" | awk '{printf "%.1f", $1 * 100 / $2}')"
|
||||
size="$size%"
|
||||
|
Loading…
x
Reference in New Issue
Block a user