|
|
|
@ -639,12 +639,9 @@ function web_get() { |
|
|
|
|
|
|
|
|
|
function zsync_get() { |
|
|
|
|
local DIR="${2}" |
|
|
|
|
local FILE="" |
|
|
|
|
local FILE="${1##*/}" |
|
|
|
|
local OUT="" |
|
|
|
|
local URL="${1}" |
|
|
|
|
local ZS="" |
|
|
|
|
|
|
|
|
|
FILE="${URL##*/}" |
|
|
|
|
|
|
|
|
|
if command -v zsync &>/dev/null; then |
|
|
|
|
if [ -n "${3}" ]; then |
|
|
|
@ -668,7 +665,11 @@ function zsync_get() { |
|
|
|
|
fi |
|
|
|
|
else |
|
|
|
|
echo "INFO: zsync not found, falling back to wget/aria2c" |
|
|
|
|
web_get "${ISO}" "${DIR}" |
|
|
|
|
if [ -n "${3}" ]; then |
|
|
|
|
web_get "${1}" "${2}" "${3}" |
|
|
|
|
else |
|
|
|
|
web_get "${1}" "${2}" |
|
|
|
|
fi |
|
|
|
|
fi |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|