From 1c9ad52f5c36126992af7968592e13a6ea414ba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=96=B5=E4=BA=8C?= <66155308+miaoermua@users.noreply.github.com> Date: Sun, 7 Jul 2024 02:24:57 +0800 Subject: [PATCH] fix: sysup --- cattools.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cattools.sh b/cattools.sh index 5ee99da..7c73fb0 100644 --- a/cattools.sh +++ b/cattools.sh @@ -704,21 +704,21 @@ sysupgrade() { echo "+ 会抹除 opkg 或手动方式安装的插件,可以通过后续在软件源中获取!" echo "+ 该更新同样会下载最新版本,应当更新前使用 Cattools 中的 catwrt_update 检查更新" - read -t 30 -p "Confirm the upgrade /// 确认升级系统? ([1] 确认/[2] 取消) " confirm_upgrade - if [ -z "$confirm_upgrade" ] || [ "$confirm_upgrade" == "1" ]; then - echo "Accelerate using CN region /// 是否需要使用由 GHProxy 提供的加速下载? ([1] 加速/[2] 不加速) " + read -t 15 -p "确认升级系统 (y/n)? " confirm_upgrade + if [[ $confirm_upgrade =~ ^[Yy]$ ]]; then + echo "是否需要加速下载?默认加速,按 2 跳过加速。" read -t 5 -p "选择: " use_accel - if [ -z "$use_accel" ] || [ "$use_accel" != "2" ]; then + if [ "$use_accel" == "2" ]; then if [ $efi_mode -eq 1 ]; then - curl https://mirror.ghproxy.com/$AMD64_EFI_SYSUP_BASHURL | bash + curl $AMD64_EFI_SYSUP | bash else - curl https://mirror.ghproxy.com/$AMD64_BIOS_SYSUP_BASHURL | bash + curl $AMD64_BIOS_SYSUP | bash fi else if [ $efi_mode -eq 1 ]; then - curl $AMD64_EFI_SYSUP_BASHURL | bash + curl https://mirror.ghproxy.com/$AMD64_EFI_SYSUP | bash else - curl $AMD64_BIOS_SYSUP_BASHURL | bash + curl https://mirror.ghproxy.com/$AMD64_BIOS_SYSUP | bash fi fi else