功能: 在安装脚本主菜单添加退出选项

- 在操作模式选择菜单中添加 [0] 退出脚本 选项
- 修改输入提示从 [1-4] 改为 [0-4]
- 在case语句中添加选项0的处理逻辑
- 选择0时显示"正在退出脚本..."并正常退出

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-12 11:20:51 +08:00
parent 28beee695a
commit 644c468a67

View File

@@ -2143,10 +2143,11 @@ main() {
echo -e "${BLUE}[2]${NC} 更新/升级 玩玩云" echo -e "${BLUE}[2]${NC} 更新/升级 玩玩云"
echo -e "${YELLOW}[3]${NC} 修复/重新配置 玩玩云" echo -e "${YELLOW}[3]${NC} 修复/重新配置 玩玩云"
echo -e "${RED}[4]${NC} 卸载 玩玩云" echo -e "${RED}[4]${NC} 卸载 玩玩云"
echo -e "${GRAY}[0]${NC} 退出脚本"
echo "" echo ""
while true; do while true; do
read -p "请输入选项 [1-4]: " mode_choice < /dev/tty read -p "请输入选项 [0-4]: " mode_choice < /dev/tty
case $mode_choice in case $mode_choice in
1) 1)
print_success "已选择: 安装模式" print_success "已选择: 安装模式"
@@ -2171,6 +2172,11 @@ main() {
uninstall_main uninstall_main
exit 0 exit 0
;; ;;
0)
print_info "正在退出脚本..."
echo ""
exit 0
;;
*) *)
print_error "无效选项,请重新选择" print_error "无效选项,请重新选择"
;; ;;