Unverified Commit 71a0aaf3 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

feat: Show download percentage (#487)

parent 722e5d9c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ do
  if [ -s "$file" ]; then
    bytes=$(du -sb "$file" | cut -f1)
    if (( bytes > 1000 )); then
      if [ -z "$total" ]; then
      if [ -z "$total" ] || [[ "$total" == "0" ]]; then
        size=$(numfmt --to=iec --suffix=B  "$bytes" | sed -r 's/([A-Z])/ \1/')
      else
        size=$(printf '%.1f\n' "$((bytes*100*100/total))e-2")