mirror of
https://github.com/tw93/Mole.git
synced 2026-03-24 00:55:08 +00:00
🔖 1.6.0
This commit is contained in:
6
mole
6
mole
@@ -22,7 +22,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|||||||
source "$SCRIPT_DIR/lib/common.sh"
|
source "$SCRIPT_DIR/lib/common.sh"
|
||||||
|
|
||||||
# Version info
|
# Version info
|
||||||
VERSION="1.5.7"
|
VERSION="1.6.0"
|
||||||
MOLE_TAGLINE="can dig deep to clean your Mac."
|
MOLE_TAGLINE="can dig deep to clean your Mac."
|
||||||
|
|
||||||
# Check for updates (non-blocking, cached)
|
# Check for updates (non-blocking, cached)
|
||||||
@@ -182,12 +182,12 @@ update_mole() {
|
|||||||
# Run installer quietly and get new version
|
# Run installer quietly and get new version
|
||||||
if "$tmp_installer" --prefix "$install_dir" --config "$HOME/.config/mole" --update >/dev/null 2>&1; then
|
if "$tmp_installer" --prefix "$install_dir" --config "$HOME/.config/mole" --update >/dev/null 2>&1; then
|
||||||
local new_version
|
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})"
|
echo -e "${GREEN}✓${NC} Updated to latest version (${new_version:-unknown})"
|
||||||
else
|
else
|
||||||
if "$tmp_installer" --prefix "$install_dir" --config "$HOME/.config/mole" >/dev/null 2>&1; then
|
if "$tmp_installer" --prefix "$install_dir" --config "$HOME/.config/mole" >/dev/null 2>&1; then
|
||||||
local new_version
|
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})"
|
echo -e "${GREEN}✓${NC} Updated to latest version (${new_version:-unknown})"
|
||||||
else
|
else
|
||||||
rm -f "$tmp_installer"
|
rm -f "$tmp_installer"
|
||||||
|
|||||||
Reference in New Issue
Block a user