From c2dc90f8da08c614684d5c3042e9464de57cdecd Mon Sep 17 00:00:00 2001 From: bin456789 Date: Tue, 28 Nov 2023 20:03:03 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E8=BF=90=E8=A1=8C=20curl=20=E6=97=B6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=20url?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reinstall.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/reinstall.sh b/reinstall.sh index 69a2784..0be0603 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -62,6 +62,7 @@ error_and_exit() { curl() { # 添加 -f, --fail,不然 404 退出码也为0 # 32位 cygwin 已停止更新,证书可能有问题,先添加 --insecure + grep -o 'http[^ ]*' <<<"$@" >&2 command curl --insecure --connect-timeout 5 --retry 2 --retry-delay 1 -f "$@" } @@ -175,7 +176,6 @@ test_url_real() { expect_type=$3 var_to_eval=$4 info test url - echo $url failed() { $grace && return 1 @@ -954,7 +954,6 @@ install_grub_win() { grub_ver=2.06 is_in_china && grub_url=https://mirrors.tuna.tsinghua.edu.cn/gnu/grub/grub-$grub_ver-for-windows.zip || grub_url=https://mirror.fcix.net/gnu/grub/grub-$grub_ver-for-windows.zip - echo $grub_url curl -Lo /tmp/grub.zip $grub_url # unzip -qo /tmp/grub.zip 7z x /tmp/grub.zip -o/tmp -r -y -xr!i386-efi -xr!locale -xr!themes -bso0 @@ -1379,10 +1378,7 @@ if is_netboot_xyz; then else # 下载 nextos 内核 info download vmlnuz and initrd - echo $nextos_vmlinuz curl -Lo /reinstall-vmlinuz $nextos_vmlinuz - - echo $nextos_initrd curl -Lo /reinstall-initrd $nextos_initrd build_finalos_cmdline