check and re-download a prefetched file that doesn't match the checksum

This commit is contained in:
Kayou 2023-09-07 14:59:08 +02:00 committed by GitHub
parent 51d8608b40
commit 3dfab89c1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -244,9 +244,11 @@ ynh_setup_source() {
if [ "$src_format" = "docker" ]; then
src_platform="${src_platform:-"linux/$YNH_ARCH"}"
elif test -e "$local_src"; then
cp $local_src $src_filename
else
if test -e "$local_src"; then
cp $local_src $src_filename
fi
[ -n "$src_url" ] || ynh_die "Couldn't parse SOURCE_URL from $src_file_path ?"
# If the file was prefetched but somehow doesn't match the sum, rm and redownload it