mirror of
https://github.com/tw93/Mole.git
synced 2026-02-11 03:39:16 +00:00
Simplified words
This commit is contained in:
14
bin/clean.sh
14
bin/clean.sh
@@ -221,7 +221,7 @@ start_section() {
|
||||
|
||||
end_section() {
|
||||
if [[ $TRACK_SECTION -eq 1 && $SECTION_ACTIVITY -eq 0 ]]; then
|
||||
echo -e " ${GREEN}${ICON_SUCCESS}${NC} Nothing to tidy"
|
||||
echo -e " ${GREEN}${ICON_SUCCESS}${NC} Nothing to clean"
|
||||
fi
|
||||
TRACK_SECTION=0
|
||||
}
|
||||
@@ -1240,7 +1240,7 @@ perform_cleanup() {
|
||||
end_section
|
||||
|
||||
# ===== 10. Virtualization tools =====
|
||||
start_section "Virtualization tools"
|
||||
start_section "Virtual machine tools"
|
||||
safe_clean ~/Library/Caches/com.vmware.fusion "VMware Fusion cache"
|
||||
safe_clean ~/Library/Caches/com.parallels.* "Parallels cache"
|
||||
safe_clean ~/VirtualBox\ VMs/.cache "VirtualBox cache"
|
||||
@@ -1279,7 +1279,7 @@ perform_cleanup() {
|
||||
# ===== 12. Orphaned app data cleanup =====
|
||||
# Only touch apps missing from scan + 60+ days inactive
|
||||
# Skip protected vendors, keep Preferences/Application Support
|
||||
start_section "Orphaned app data"
|
||||
start_section "Leftover app data"
|
||||
|
||||
local -r ORPHAN_AGE_THRESHOLD=60 # 60 days - good balance between safety and cleanup
|
||||
|
||||
@@ -1419,14 +1419,14 @@ perform_cleanup() {
|
||||
done
|
||||
|
||||
stop_inline_spinner
|
||||
echo -e " ${GREEN}${ICON_SUCCESS}${NC} Found $orphaned_count orphaned app resources"
|
||||
echo -e " ${GREEN}${ICON_SUCCESS}${NC} Found $orphaned_count leftover app files"
|
||||
|
||||
if [[ $orphaned_count -gt 0 ]]; then
|
||||
local orphaned_mb=$(echo "$total_orphaned_kb" | awk '{printf "%.1f", $1/1024}')
|
||||
echo " ${GREEN}${ICON_SUCCESS}${NC} Cleaned $orphaned_count orphaned items (~${orphaned_mb}MB)"
|
||||
echo " ${GREEN}${ICON_SUCCESS}${NC} Cleaned $orphaned_count leftover items (~${orphaned_mb}MB)"
|
||||
note_activity
|
||||
else
|
||||
echo " ${GREEN}${ICON_SUCCESS}${NC} No orphaned app data found"
|
||||
echo " ${GREEN}${ICON_SUCCESS}${NC} No leftover app data found"
|
||||
fi
|
||||
|
||||
rm -f "$installed_bundles"
|
||||
@@ -1435,7 +1435,7 @@ perform_cleanup() {
|
||||
|
||||
# ===== 13. Apple Silicon optimizations =====
|
||||
if [[ "$IS_M_SERIES" == "true" ]]; then
|
||||
start_section "Apple Silicon optimizations"
|
||||
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"
|
||||
|
||||
@@ -174,18 +174,18 @@ execute_optimization() {
|
||||
timeout 10 /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user > /dev/null 2>&1 || true
|
||||
echo -e "${GREEN}${ICON_SUCCESS}${NC} LaunchServices database rebuilt"
|
||||
|
||||
echo -e "${BLUE}${ICON_ARROW}${NC} Flushing DNS cache..."
|
||||
echo -e "${BLUE}${ICON_ARROW}${NC} Clearing DNS cache..."
|
||||
if sudo dscacheutil -flushcache 2> /dev/null && sudo killall -HUP mDNSResponder 2> /dev/null; then
|
||||
echo -e "${GREEN}${ICON_SUCCESS}${NC} DNS cache flushed"
|
||||
echo -e "${GREEN}${ICON_SUCCESS}${NC} DNS cache cleared"
|
||||
else
|
||||
echo -e "${RED}${ICON_ERROR}${NC} Failed to flush DNS cache"
|
||||
echo -e "${RED}${ICON_ERROR}${NC} Failed to clear DNS cache"
|
||||
fi
|
||||
|
||||
echo -e "${BLUE}${ICON_ARROW}${NC} Purging memory cache..."
|
||||
echo -e "${BLUE}${ICON_ARROW}${NC} Clearing memory cache..."
|
||||
if sudo purge 2> /dev/null; then
|
||||
echo -e "${GREEN}${ICON_SUCCESS}${NC} Memory cache purged"
|
||||
echo -e "${GREEN}${ICON_SUCCESS}${NC} Memory cache cleared"
|
||||
else
|
||||
echo -e "${RED}${ICON_ERROR}${NC} Failed to purge memory"
|
||||
echo -e "${RED}${ICON_ERROR}${NC} Failed to clear memory"
|
||||
fi
|
||||
|
||||
echo -e "${BLUE}${ICON_ARROW}${NC} Rebuilding font cache..."
|
||||
@@ -215,7 +215,7 @@ execute_optimization() {
|
||||
cleanup_path "$target_path" "$label"
|
||||
done
|
||||
|
||||
echo -e "${GREEN}${ICON_SUCCESS}${NC} Finder and Safari caches refreshed"
|
||||
echo -e "${GREEN}${ICON_SUCCESS}${NC} Finder and Safari caches updated"
|
||||
;;
|
||||
|
||||
maintenance_scripts)
|
||||
@@ -231,9 +231,9 @@ execute_optimization() {
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -e "${BLUE}${ICON_ARROW}${NC} Rotating system logs..."
|
||||
echo -e "${BLUE}${ICON_ARROW}${NC} Moving old system logs..."
|
||||
if sudo newsyslog > /dev/null 2>&1; then
|
||||
echo -e "${GREEN}${ICON_SUCCESS}${NC} Log rotation complete"
|
||||
echo -e "${GREEN}${ICON_SUCCESS}${NC} Log move complete"
|
||||
else
|
||||
echo -e "${YELLOW}!${NC} newsyslog reported an issue"
|
||||
fi
|
||||
@@ -295,7 +295,7 @@ execute_optimization() {
|
||||
sudo rm -f /Library/Preferences/com.apple.Bluetooth.plist 2> /dev/null || true
|
||||
echo -e " ${GREEN}${ICON_SUCCESS}${NC} Bluetooth caches refreshed"
|
||||
|
||||
echo -e "${BLUE}${ICON_ARROW}${NC} Resetting Wi-Fi configuration..."
|
||||
echo -e "${BLUE}${ICON_ARROW}${NC} Resetting Wi-Fi settings..."
|
||||
local sysconfig="/Library/Preferences/SystemConfiguration"
|
||||
if [[ -d "$sysconfig" ]]; then
|
||||
sudo cp "$sysconfig"/com.apple.airport.preferences.plist "$sysconfig"/com.apple.airport.preferences.plist.bak 2> /dev/null || true
|
||||
@@ -325,7 +325,7 @@ execute_optimization() {
|
||||
;;
|
||||
|
||||
saved_state_cleanup)
|
||||
echo -e "${BLUE}${ICON_ARROW}${NC} Purging saved application states..."
|
||||
echo -e "${BLUE}${ICON_ARROW}${NC} Removing saved application states..."
|
||||
local state_dir="$HOME/Library/Saved Application State"
|
||||
cleanup_path "$state_dir" "Saved Application State"
|
||||
ensure_directory "$state_dir"
|
||||
|
||||
Reference in New Issue
Block a user