Update progress.sh
This commit is contained in:
parent
e75dceb3b6
commit
8316583e2e
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ do
|
||||||
bytes=$(du -sb "$file" | cut -f1)
|
bytes=$(du -sb "$file" | cut -f1)
|
||||||
if (( bytes > 1000 )); then
|
if (( bytes > 1000 )); then
|
||||||
if [ -z "$total" ] || [[ "$total" == "0" ]]; then
|
if [ -z "$total" ] || [[ "$total" == "0" ]]; then
|
||||||
size=$(numfmt --to=iec --suffix=B "$bytes" | sed -r 's/([A-Z])/ \1/')
|
size=$(formatBytes "$bytes")
|
||||||
else
|
else
|
||||||
size="$(echo "$bytes" "$total" | awk '{printf "%.1f", $1 * 100 / $2}')"
|
size="$(echo "$bytes" "$total" | awk '{printf "%.1f", $1 * 100 / $2}')"
|
||||||
size="$size%"
|
size="$size%"
|
||||||
|
|
Loading…
Reference in a new issue