Updated Download function.

This commit is contained in:
Storm Dragon 2024-12-14 15:06:27 -05:00
parent 93f5f9177a
commit 3da23b9432

View File

@ -199,12 +199,12 @@ download() {
dest="${dest#*\?filename=}"
dest="${dest%\?*}"
# Remove the destination file if it is empty.
test -s "${cache}/${dest}" || rm -f "${cache}/${dest}" 2> /dev/null
[[ -s "${cache}/${dest}" ]] || rm -f "${cache}/${dest}" 2> /dev/null
if [[ "${redownload}" == "true" ]] && [[ -e "${cache}/${dest}" ]]; then
rm -v "${cache}/${dest}"
fi
# Skip if the item is in cache.
test -e "${cache}/${dest}" && continue
[[ -e "${cache}/${dest}" ]] && continue
{ if ! curl -L4 -C - --retry 10 --output "${cache}/${dest}" "${i}" ; then
echo "Could not download \"$i\"..."
exit 1