Message ID | 06b4eb57a7671f63c52d7a71bfc141682fdb0e38.1418337531.git.yann.morin.1998@free.fr |
---|---|
State | Accepted |
Headers | show |
diff --git a/support/download/dl-wrapper b/support/download/dl-wrapper index f0cdd73..cced8f6 100755 --- a/support/download/dl-wrapper +++ b/support/download/dl-wrapper @@ -49,7 +49,11 @@ main() { # If the output file already exists, do not download it again if [ -e "${output}" ]; then - exit 0 + if support/download/check-hash "${hfile}" "${output}" "${output##*/}"; then + exit 0 + fi + rm -f "${output}" + printf "Re-downloading '%s'...\n" "${output##*/}" fi # tmpd is a temporary directory in which backends may store intermediate