From 82181c809071fee99e8b6a6b4baf1b774571410c Mon Sep 17 00:00:00 2001 From: bin456789 Date: Wed, 5 Jul 2023 21:54:37 +0800 Subject: [PATCH] =?UTF-8?q?common:=20aria2=20=E6=B7=BB=E5=8A=A0=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit aria2 始终使用相对路径,但我们代码使用绝对路径,所以要设置当前目录为/ --- trans.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trans.sh b/trans.sh index 7fd8300..0d4fd44 100644 --- a/trans.sh +++ b/trans.sh @@ -47,7 +47,7 @@ download() { # axel 在 lightsail 上会占用大量cpu # 先用 aria2 下载 - [ -z $file ] && save="" || save="-o $file" + [ -z $file ] && save="" || save="-d / -o $file" if ! aria2c -x4 $url $save; then # 出错再用 curl [ -z $file ] && save="-O" || save="-o $file"