1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 16:49:41 +00:00

Add immediate feedback for system cache cleaning

This commit is contained in:
Tw93
2025-12-28 14:59:17 +08:00
parent 79dc98f665
commit 99e9fc4cb3

View File

@@ -9,9 +9,11 @@ clean_deep_system() {
stop_section_spinner stop_section_spinner
# Clean old system caches # Clean old system caches
safe_sudo_find_delete "/Library/Caches" "*.cache" "$MOLE_TEMP_FILE_AGE_DAYS" "f" || true local cache_cleaned=0
safe_sudo_find_delete "/Library/Caches" "*.tmp" "$MOLE_TEMP_FILE_AGE_DAYS" "f" || true safe_sudo_find_delete "/Library/Caches" "*.cache" "$MOLE_TEMP_FILE_AGE_DAYS" "f" && cache_cleaned=1 || true
safe_sudo_find_delete "/Library/Caches" "*.log" "$MOLE_LOG_AGE_DAYS" "f" || true safe_sudo_find_delete "/Library/Caches" "*.tmp" "$MOLE_TEMP_FILE_AGE_DAYS" "f" && cache_cleaned=1 || true
safe_sudo_find_delete "/Library/Caches" "*.log" "$MOLE_LOG_AGE_DAYS" "f" && cache_cleaned=1 || true
[[ $cache_cleaned -eq 1 ]] && log_success "System caches"
# Clean temporary files (macOS /tmp is a symlink to /private/tmp) # Clean temporary files (macOS /tmp is a symlink to /private/tmp)
local tmp_cleaned=0 local tmp_cleaned=0