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

🎨 Loading optimization and better use of links

This commit is contained in:
Tw93
2025-10-08 18:01:46 +08:00
parent 79b1ea4091
commit 1657ff584b
9 changed files with 623 additions and 308 deletions

11
mole
View File

@@ -148,11 +148,11 @@ update_mole() {
fi
# Download and run installer with progress
echo -e "${BLUE}${NC} Downloading latest version..."
echo -e "${BLUE}|${NC} Downloading latest version..."
local installer_url="https://raw.githubusercontent.com/tw93/mole/main/install.sh"
local tmp_installer
tmp_installer="$(mktemp)" || { log_error "Update failed"; exit 1; }
tmp_installer="$(mktemp_file)" || { log_error "Update failed"; exit 1; }
# Download installer with progress
if command -v curl >/dev/null 2>&1; then
@@ -181,7 +181,7 @@ update_mole() {
local install_dir
install_dir="$(cd "$(dirname "$mole_path")" && pwd)"
echo -e "${BLUE}${NC} Installing update..."
echo -e "${BLUE}|${NC} Installing update..."
# Run installer with visible output (but capture for error handling)
local install_output
@@ -286,10 +286,7 @@ remove_mole() {
echo ""
# Confirm removal
read -p "Are you sure you want to remove Mole? (y/N): " -n 1 -r
echo ""
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
read -p "Are you sure you want to remove Mole? (y/N): " -n 1 -r; echo ""; if [[ ! $REPLY =~ ^[Yy]$ ]]; then
echo "Cancelled."
exit 0
fi