Remove dependence on perl (#41)

* Remove dependence on perl

* Fix shellcheck SC2004

* Fix shellcheck SC2004
This commit is contained in:
Karol Kozlowski 2024-08-29 17:06:00 +02:00 committed by GitHub
parent 6087250290
commit 9cea80a9c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -69,7 +69,7 @@ function rebalance () {
fi fi
current_index="$((current_index + 1))" current_index="$((current_index + 1))"
progress_percent=$(perl -e "printf('%0.2f', ${current_index}*100/${file_count})") progress_percent=$(printf '%0.2f' "$((current_index*10000/file_count))e-2")
color_echo "${Cyan}" "Progress -- Files: ${current_index}/${file_count} (${progress_percent}%)" color_echo "${Cyan}" "Progress -- Files: ${current_index}/${file_count} (${progress_percent}%)"
if [[ ! -f "${file_path}" ]]; then if [[ ! -f "${file_path}" ]]; then