1
0
mirror of https://github.com/tw93/Mole.git synced 2026-03-22 18:30:08 +00:00

chore: auto format code

This commit is contained in:
Tw93
2026-03-03 07:52:51 +00:00
parent 00f29cff20
commit c41dcbcdee

View File

@@ -1028,10 +1028,10 @@ perform_cleanup() {
# ============================================ # ============================================
# Dynamic size formatting (KB → MB → GB) # Dynamic size formatting (KB → MB → GB)
# ============================================ # ============================================
if (( total_size_cleaned < 1024 )); then if ((total_size_cleaned < 1024)); then
freed_value="$total_size_cleaned" freed_value="$total_size_cleaned"
freed_unit="KB" freed_unit="KB"
elif (( total_size_cleaned < 1024 * 1024 )); then elif ((total_size_cleaned < 1024 * 1024)); then
freed_value=$(printf "%.2f" "$(echo "scale=4; $total_size_cleaned/1024" | bc)") freed_value=$(printf "%.2f" "$(echo "scale=4; $total_size_cleaned/1024" | bc)")
freed_unit="MB" freed_unit="MB"
else else
@@ -1073,8 +1073,8 @@ perform_cleanup() {
summary_details+=("$summary_line") summary_details+=("$summary_line")
# Movie comparison only if unit is GB and >= 1GB # Movie comparison only if unit is GB and >= 1GB
if [[ "$freed_unit" == "GB" ]] && \ if [[ "$freed_unit" == "GB" ]] &&
[[ $(echo "$freed_value >= 1" | bc) -eq 1 ]]; then [[ $(echo "$freed_value >= 1" | bc) -eq 1 ]]; then
local movies local movies
movies=$(printf "%.0f" "$(echo "scale=2; $freed_value/4.5" | bc)") movies=$(printf "%.0f" "$(echo "scale=2; $freed_value/4.5" | bc)")