1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 14:26:46 +00:00

Tweak macOS update detection and bump version

This commit is contained in:
Tw93
2025-12-29 15:13:37 +08:00
parent 694c55f73b
commit beaaa98c9b
2 changed files with 6 additions and 4 deletions

View File

@@ -265,9 +265,11 @@ check_macos_update() {
fi
# Prefer avoiding false negatives: if the system indicates updates are pending,
# only clear the flag when softwareupdate explicitly reports no updates.
if [[ $sw_status -eq 0 && -n "$sw_output" ]] && echo "$sw_output" | grep -qE '^\s*No new software available\s*\.?\s*$'; then
updates_available="false"
# only clear the flag when softwareupdate returns a list without any update entries.
if [[ $sw_status -eq 0 && -n "$sw_output" ]]; then
if ! echo "$sw_output" | grep -qE '^[[:space:]]*\*'; then
updates_available="false"
fi
fi
fi

2
mole
View File

@@ -25,7 +25,7 @@ source "$SCRIPT_DIR/lib/core/common.sh"
trap cleanup_temp_files EXIT INT TERM
# Version info
VERSION="1.15.5"
VERSION="1.15.6"
MOLE_TAGLINE="Deep clean and optimize your Mac."
# Check TouchID configuration