diff --git a/mole b/mole index 87a1594..88f000f 100755 --- a/mole +++ b/mole @@ -22,7 +22,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" source "$SCRIPT_DIR/lib/common.sh" # Version info -VERSION="1.5.7" +VERSION="1.6.0" MOLE_TAGLINE="can dig deep to clean your Mac." # Check for updates (non-blocking, cached) @@ -182,12 +182,12 @@ update_mole() { # Run installer quietly and get new version if "$tmp_installer" --prefix "$install_dir" --config "$HOME/.config/mole" --update >/dev/null 2>&1; then local new_version - new_version=$(grep '^VERSION=' "$tmp_installer" 2>/dev/null | head -1 | sed 's/VERSION="\(.*\)"/\1/' || echo "") + new_version=$("$mole_path" --version 2>/dev/null | awk 'NF {print $NF}' || echo "") echo -e "${GREEN}✓${NC} Updated to latest version (${new_version:-unknown})" else if "$tmp_installer" --prefix "$install_dir" --config "$HOME/.config/mole" >/dev/null 2>&1; then local new_version - new_version=$(grep '^VERSION=' "$tmp_installer" 2>/dev/null | head -1 | sed 's/VERSION="\(.*\)"/\1/' || echo "") + new_version=$("$mole_path" --version 2>/dev/null | awk 'NF {print $NF}' || echo "") echo -e "${GREEN}✓${NC} Updated to latest version (${new_version:-unknown})" else rm -f "$tmp_installer"