From 545ce0c22da5a7793186523716b009a977f265cf Mon Sep 17 00:00:00 2001 From: alberic89 Date: Sat, 19 Aug 2023 14:40:16 +0200 Subject: [PATCH] Show two links if the download of riivolution patch failed --- scripts/common/downloader.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/scripts/common/downloader.sh b/scripts/common/downloader.sh index aa42873..eb94385 100644 --- a/scripts/common/downloader.sh +++ b/scripts/common/downloader.sh @@ -47,7 +47,7 @@ download_riivolution_patch () { ${GDOWN} "${DOWNLOAD_LINK}" \ "${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}"__tmp >/dev/null || \ ( rm "${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}"__tmp && \ - echo -e "\nDownload failed!" && exit 57 ) + download_riivolution_failed && exit 57 ) mv "${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}"__tmp \ "${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}" echo "*** >> unpacking" @@ -61,7 +61,7 @@ download_riivolution_patch () { --path="${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}"__tmp \ "${DOWNLOAD_LINK}" >/dev/null || \ ( rm "${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}"__tmp && \ - echo -e "\nDownload failed!" && exit 57 ) + download_riivolution_failed && exit 57 ) mv "${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}"__tmp \ "${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}" echo "*** >> unpacking" @@ -80,6 +80,7 @@ download_riivolution_patch () { "" ) echo "no download link for ${GAMENAME} available." + download_riivolution_failed exit 21 ;; @@ -89,7 +90,7 @@ download_riivolution_patch () { wget -nv --no-check-certificate "${DOWNLOAD_LINK}" \ -O "${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}"__tmp || \ ( rm "${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}"__tmp && \ - echo -e "\nDownload failed!" && exit 57 ) + download_riivolution_failed && exit 57 ) mv "${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}"__tmp \ "${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}" echo "*** >> unpacking" @@ -122,3 +123,11 @@ download_covers () { done } + +download_riivolution_failed () { + echo -e "\nDownload failed! +You can try to download manualy from : + https://goaibox.com/sl/3suwkMVFZj + https://archive.org/download/new-super-mario-bros-wii-mod-archive/" + +}