Skip to content

Commit

Permalink
fix: Progress calculation (#581)
Browse files Browse the repository at this point in the history
  • Loading branch information
kroese authored Aug 18, 2024
1 parent 8222f8e commit db85ade
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/progress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ do
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")
size="$(echo "$bytes" "$total" | awk '{printf "%.1f", $1 * 100 / $2}')"
size="$size%"
fi
echo "${body//(\[P\])/($size)}"> "$info"
Expand Down

0 comments on commit db85ade

Please sign in to comment.