1
0
mirror of https://github.com/tw93/Mole.git synced 2026-03-22 19:40:07 +00:00

🔖 1.6.0

This commit is contained in:
Tw93
2025-10-05 21:02:51 +08:00
parent 73f185aca0
commit ae1f99ee81

6
mole
View File

@@ -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"