mirror of
https://github.com/tw93/Mole.git
synced 2026-02-10 09:39:18 +00:00
refactor: Extract Apple Silicon cache cleaning to a shared function and improve optimization summary calculation.
This commit is contained in:
10
bin/clean.sh
10
bin/clean.sh
@@ -650,15 +650,7 @@ perform_cleanup() {
|
||||
end_section
|
||||
|
||||
# ===== 13. Apple Silicon optimizations =====
|
||||
if [[ "$IS_M_SERIES" == "true" ]]; then
|
||||
start_section "Apple Silicon updates"
|
||||
safe_clean /Library/Apple/usr/share/rosetta/rosetta_update_bundle "Rosetta 2 cache"
|
||||
safe_clean ~/Library/Caches/com.apple.rosetta.update "Rosetta 2 user cache"
|
||||
safe_clean ~/Library/Caches/com.apple.amp.mediasevicesd "Apple Silicon media service cache"
|
||||
# Skip: iCloud sync cache, may affect device pairing
|
||||
# safe_clean ~/Library/Caches/com.apple.bird.lsuseractivity "User activity cache"
|
||||
end_section
|
||||
fi
|
||||
clean_apple_silicon_caches
|
||||
|
||||
# ===== 14. iOS device backups =====
|
||||
start_section "iOS device backups"
|
||||
|
||||
@@ -67,7 +67,8 @@ show_optimization_summary() {
|
||||
local summary_title="Optimization and Check Complete"
|
||||
local -a summary_details=()
|
||||
|
||||
summary_details+=("Applied ${GREEN}${safe_count:-0}${NC} optimizations; all system services tuned")
|
||||
local total_applied=$((safe_count + confirm_count))
|
||||
summary_details+=("Applied ${GREEN}${total_applied:-0}${NC} optimizations; all system services tuned")
|
||||
summary_details+=("Updates, security and system health fully reviewed")
|
||||
|
||||
local summary_line4=""
|
||||
|
||||
BIN
bin/status-go
BIN
bin/status-go
Binary file not shown.
Reference in New Issue
Block a user