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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user