diff --git a/bin/clean.sh b/bin/clean.sh index a6a5834..5c07ef6 100755 --- a/bin/clean.sh +++ b/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" diff --git a/bin/optimize.sh b/bin/optimize.sh index a1cb07f..d41b262 100755 --- a/bin/optimize.sh +++ b/bin/optimize.sh @@ -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="" diff --git a/bin/status-go b/bin/status-go index aa8fb05..7e57b12 100755 Binary files a/bin/status-go and b/bin/status-go differ diff --git a/lib/clean/dev.sh b/lib/clean/dev.sh index 4321f9d..80a6d43 100644 --- a/lib/clean/dev.sh +++ b/lib/clean/dev.sh @@ -6,10 +6,11 @@ set -euo pipefail # Helper function to clean tool caches using their built-in commands # Args: $1 - description, $@ - command to execute # Env: DRY_RUN +# Note: Try to estimate potential savings (many tool caches don't have a direct path, +# so we just report the action if we can't easily find a path) clean_tool_cache() { local description="$1" shift - if [[ "$DRY_RUN" != "true" ]]; then if "$@" > /dev/null 2>&1; then echo -e " ${GREEN}${ICON_SUCCESS}${NC} $description" diff --git a/lib/clean/user.sh b/lib/clean/user.sh index fcf2241..be80970 100644 --- a/lib/clean/user.sh +++ b/lib/clean/user.sh @@ -366,11 +366,13 @@ check_ios_device_backups() { # Clean Apple Silicon specific caches # Env: IS_M_SERIES clean_apple_silicon_caches() { - if [[ "$IS_M_SERIES" != "true" ]]; then + if [[ "${IS_M_SERIES:-false}" != "true" ]]; then return 0 fi + 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" + end_section }