mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-02-21 01:21:27 +00:00
scripts/functions: fix downloading with aria2
In case the remote file does not exist (and probably for some other reasons as well), aria2 nonetheless creates an empty file (or not empty for some other reasons). The solution is to delete the file whenever aria2 fails.
This commit is contained in:
parent
b9eba0996a
commit
c20e01d094
@ -356,7 +356,7 @@ CT_DoGetFileAria2() {
|
||||
# so that the CT-NG's ouput is 'live'.
|
||||
CT_DoExecLog ALL aria2c -l - -s ${CT_DOWNLOAD_MAX_CHUNKS} -m 3 -t ${CT_CONNECT_TIMEOUT} -p "$1" \
|
||||
|| CT_DoExecLog ALL aria2c -l - -s ${CT_DOWNLOAD_MAX_CHUNKS} -m 3 -t ${CT_CONNECT_TIMEOUT} "$1" \
|
||||
|| true
|
||||
|| rm -f "${1##*/}"
|
||||
}
|
||||
|
||||
# OK, just look if we have them...
|
||||
|
Loading…
x
Reference in New Issue
Block a user