From b0950287a32120bd168b1661f784ad4521233e83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=85=8E=E9=A5=BC=E6=9E=9C=E5=AD=90=E5=8D=B7=E9=B2=A8?= =?UTF-8?q?=E9=B1=BC=E8=BE=A3=E6=A4=92?= Date: Wed, 5 Feb 2025 14:40:44 +0800 Subject: [PATCH] refactor: Simplify Mac system UUID modification process - Removed user confirmation prompt for UUID modification - Automatically update system UUID without additional user interaction - Added clear console output to inform user about UUID change and restart requirement --- scripts/run/cursor_mac_id_modifier.sh | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/scripts/run/cursor_mac_id_modifier.sh b/scripts/run/cursor_mac_id_modifier.sh index 0ced361..ee09844 100644 --- a/scripts/run/cursor_mac_id_modifier.sh +++ b/scripts/run/cursor_mac_id_modifier.sh @@ -175,17 +175,10 @@ generate_new_config() { # 生成新的系统 UUID local new_system_uuid=$(uuidgen) - # 尝试修改系统 UUID (需要用户确认) - echo # 添加空行使提示更清晰 - printf "${YELLOW}注意:修改系统 UUID 需要重启系统才能生效${NC}\n" - printf "${YELLOW}是否要修改系统 UUID?(y/N)${NC} " # 使用 printf 并在末尾加空格 - read -r choice - if [[ "$choice" =~ ^[Yy]$ ]]; then - sudo nvram SystemUUID="$new_system_uuid" - log_info "系统 UUID 已更新,请重启系统以应用更改" - else - log_info "跳过系统 UUID 修改" - fi + # 修改系统 UUID + sudo nvram SystemUUID="$new_system_uuid" + printf "${YELLOW}系统 UUID 已更新为: $new_system_uuid${NC}\n" + printf "${YELLOW}请重启系统以使更改生效${NC}\n" # 将 auth0|user_ 转换为字节数组的十六进制 local prefix_hex=$(echo -n "auth0|user_" | xxd -p)