mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 22:39:42 +00:00
🐛 change color
This commit is contained in:
@@ -185,14 +185,14 @@ batch_uninstall_applications() {
|
||||
if [[ "$needs_sudo" == "true" ]]; then
|
||||
if sudo rm -rf "$app_path" 2>/dev/null; then
|
||||
removal_success=true
|
||||
echo -e " ${BLUE}✓${NC} Removed application"
|
||||
echo -e " ${GREEN}✓${NC} Removed application"
|
||||
else
|
||||
error_msg="Failed to remove with sudo (check permissions or SIP protection)"
|
||||
fi
|
||||
else
|
||||
if rm -rf "$app_path" 2>/dev/null; then
|
||||
removal_success=true
|
||||
echo -e " ${BLUE}✓${NC} Removed application"
|
||||
echo -e " ${GREEN}✓${NC} Removed application"
|
||||
else
|
||||
error_msg="Failed to remove (check if app is running or protected)"
|
||||
fi
|
||||
@@ -211,7 +211,7 @@ batch_uninstall_applications() {
|
||||
done <<< "$related_files"
|
||||
|
||||
if [[ $files_removed -gt 0 ]]; then
|
||||
echo -e " ${BLUE}✓${NC} Cleaned $files_removed related files"
|
||||
echo -e " ${GREEN}✓${NC} Cleaned $files_removed related files"
|
||||
fi
|
||||
|
||||
((total_size_freed += total_kb))
|
||||
|
||||
@@ -36,7 +36,7 @@ log_info() {
|
||||
|
||||
log_success() {
|
||||
rotate_log
|
||||
echo -e " ${BLUE}✓${NC} $1"
|
||||
echo -e " ${GREEN}✓${NC} $1"
|
||||
echo "[$(date '+%Y-%m-%d %H:%M:%S')] SUCCESS: $1" >> "$LOG_FILE" 2>/dev/null || true
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ update_via_homebrew() {
|
||||
# Get current version
|
||||
local current_version
|
||||
current_version=$(brew list --versions mole 2>/dev/null | awk '{print $2}')
|
||||
echo -e "${BLUE}✓${NC} Already on latest version (${current_version:-$version})"
|
||||
echo -e "${GREEN}✓${NC} Already on latest version (${current_version:-$version})"
|
||||
elif echo "$upgrade_output" | grep -q "Error:"; then
|
||||
log_error "Homebrew upgrade failed"
|
||||
echo "$upgrade_output" | grep "Error:" >&2
|
||||
@@ -287,7 +287,7 @@ update_via_homebrew() {
|
||||
# Get new version
|
||||
local new_version
|
||||
new_version=$(brew list --versions mole 2>/dev/null | awk '{print $2}')
|
||||
echo -e "${BLUE}✓${NC} Updated to latest version (${new_version:-$version})"
|
||||
echo -e "${GREEN}✓${NC} Updated to latest version (${new_version:-$version})"
|
||||
fi
|
||||
|
||||
# Clear version check cache
|
||||
|
||||
@@ -298,7 +298,7 @@ manage_whitelist() {
|
||||
fi
|
||||
|
||||
if [[ ${#all_items[@]} -eq 0 ]]; then
|
||||
echo -e "${BLUE}✓${NC} No cache files found - system is clean!"
|
||||
echo -e "${GREEN}✓${NC} No cache files found - system is clean!"
|
||||
echo ""
|
||||
echo "Press any key to exit..."
|
||||
read -n 1 -s
|
||||
@@ -308,7 +308,7 @@ manage_whitelist() {
|
||||
# Update global array with all items
|
||||
AVAILABLE_CACHE_ITEMS=("${all_items[@]}")
|
||||
|
||||
echo -e "${BLUE}✓${NC} Found ${#AVAILABLE_CACHE_ITEMS[@]} items"
|
||||
echo -e "${GREEN}✓${NC} Found ${#AVAILABLE_CACHE_ITEMS[@]} items"
|
||||
echo ""
|
||||
|
||||
local -a menu_options=()
|
||||
@@ -432,7 +432,7 @@ EOF
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo -e "${BLUE}✓${NC} Protected $total_count items${summary}"
|
||||
echo -e "${GREEN}✓${NC} Protected $total_count items${summary}"
|
||||
echo -e "${GRAY}Config: ${WHITELIST_CONFIG}${NC}"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user