From a97a82dde8dc8f663b52d9f7b333aa7233f43b4b Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Sat, 27 Aug 2016 11:02:45 +0200 Subject: [PATCH] proper mega.nz downloader function --- scripts/common/downloader.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/common/downloader.sh b/scripts/common/downloader.sh index cef79f5..c462d1b 100644 --- a/scripts/common/downloader.sh +++ b/scripts/common/downloader.sh @@ -51,6 +51,19 @@ download_riivolution_patch () { unpack "${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}" ;; + *mega.nz* ) + x=5 + echo "*** >> downloading" + ${MEGADL} \ + --path="${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}"__tmp \ + "${DOWNLOAD_LINK}" >/dev/null || \ + ( echo -e "\nDownload failed!" && exit 57 ) + mv "${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}"__tmp \ + "${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}" + echo "*** >> unpacking" + unpack "${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}" + ;; + *romhacking* ) x=6 echo "can not download from Romhacking, download manually from: