mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-19 04:49:13 +08:00
core: 设置aria2允许覆盖源文件,和curl行为一致
This commit is contained in:
parent
9003e5cffa
commit
8b4538441c
2
trans.sh
2
trans.sh
@ -50,7 +50,7 @@ download() {
|
||||
# axel 在 lightsail 上会占用大量cpu
|
||||
# 先用 aria2 下载
|
||||
[ -z $file ] && save="" || save="-d / -o $file"
|
||||
if ! aria2c -x4 $url $save; then
|
||||
if ! aria2c -x4 --allow-overwrite=true $url $save; then
|
||||
# 出错再用 curl
|
||||
[ -z $file ] && save="-O" || save="-o $file"
|
||||
curl -L $url $save
|
||||
|
Loading…
x
Reference in New Issue
Block a user