From 094811b98aff4ef0ebfa59308565ca66e2bb40a5 Mon Sep 17 00:00:00 2001 From: yuyx <237899745@qq.com> Date: Sun, 30 Nov 2025 21:00:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D:=20=E7=AE=A1=E9=81=93?= =?UTF-8?q?=E8=BF=90=E8=A1=8C=E6=97=B6=E6=97=A0=E6=B3=95=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup_cups.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup_cups.sh b/setup_cups.sh index f592dd8..7a4db72 100755 --- a/setup_cups.sh +++ b/setup_cups.sh @@ -185,7 +185,7 @@ select_drivers() { echo "" echo -e " ${BLUE}示例: 1 2 或 1,2 表示同时安装通用驱动和HP驱动${NC}" echo "" - read -p "请输入选项 (默认: 1): " driver_choice + read -p "请输入选项 (默认: 1): " driver_choice < /dev/tty driver_choice=${driver_choice:-1} # 统一分隔符 driver_choice=$(echo "$driver_choice" | tr ',' ' ') @@ -304,7 +304,7 @@ main() { echo -e "${YELLOW}是否将软件源更换为国内镜像(清华大学)?${NC}" echo " 推荐:国内用户选择 Y,可大幅加快下载速度" echo "" - read -p "更换国内源? [Y/n]: " change_mirror + read -p "更换国内源? [Y/n]: " change_mirror < /dev/tty change_mirror=${change_mirror:-Y} echo "" @@ -322,7 +322,7 @@ main() { echo " 6. 将当前用户添加到 lpadmin 组" echo " 7. 启动并设置开机自启" echo "" - read -p "是否继续? [Y/n]: " confirm + read -p "是否继续? [Y/n]: " confirm < /dev/tty confirm=${confirm:-Y} if [[ ! "$confirm" =~ ^[Yy]$ ]]; then