From c3c7142df7d0929b1ea0875cde3d07dad979908b Mon Sep 17 00:00:00 2001 From: bin456789 Date: Tue, 8 Aug 2023 23:36:23 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E5=A4=87=E7=94=A8=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E6=94=B9=E4=B8=BA=20wget?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- trans.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/trans.sh b/trans.sh index 1eb14f9..0aeb1f8 100644 --- a/trans.sh +++ b/trans.sh @@ -66,10 +66,14 @@ download() { fi fi # 先用 aria2 下载 + # aria2 下载 fedora 官方镜像链接会将meta4文件下载下来,而且占用了指定文件名,造成重命名失效。而且无法指定目录 + # https://download.opensuse.org/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-Minimal-VM.x86_64-kvm-and-xen.qcow2 + # https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-o if ! (command -v aria2c && aria2c -x4 --allow-overwrite=true $url $save); then - # 出错再用 curl - [ -z $file ] && save="-O" || save="-o $file" - curl -L $url $save + # 出错再用 wget + # alpine 的 busybox 没有 curl + [ -z $file ] && save="" || save="-O $file" + wget $url $save fi }