From 7fe184502fea9aa81721101c44fd9d1baf9e2e8c Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Thu, 20 Jun 2013 18:15:08 +0200 Subject: [PATCH] also unzip the riivolution files after download // add support for downloading soundtrack --- script.d/common.sh | 19 +++++++++++++++++++ script.d/newersmb.sh | 4 +++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/script.d/common.sh b/script.d/common.sh index d25a84f..8e25910 100644 --- a/script.d/common.sh +++ b/script.d/common.sh @@ -41,6 +41,20 @@ read GAME } +download_soundtrack () { + + if [[ ${SOUNDTRACK} ]]; then + if [[ ${SOUNDTRACK_LINK} ]]; then + wget ${SOUNDTRACK_LINK} -O ./${SOUNDTRACK_ZIP} + exit 0 + else + echo -e "no soundtrack for ${GAME} available." + exit 1 + fi + fi + +} + check_input_image () { if [[ ! ${IMAGE} ]]; then @@ -60,6 +74,7 @@ check_riivolution_patch () { if [[ ${DOWNLOAD} ]]; then wget ${DOWNLOAD_LINK} -O ./${RIIVOLUTION_ZIP} + unzip ./${RIIVOLUTION_ZIP} >/dev/null elif [[ ! ${RIIVOLUTION}} ]]; then if [[ -e ./${RIIVOLUTION_ZIP} ]]; then unzip ./${RIIVOLUTION_ZIP} >/dev/null @@ -114,6 +129,10 @@ while [[ $xcount -lt $pcount ]]; do DOWNLOAD=TRUE ;; + --soundtrack ) + SOUNDTRACK=TRUE + ;; + --version=* ) VERSION=${1/*=} case ${VERSION} in diff --git a/script.d/newersmb.sh b/script.d/newersmb.sh index e771599..f0a9b05 100644 --- a/script.d/newersmb.sh +++ b/script.d/newersmb.sh @@ -2,7 +2,9 @@ WORKDIR=./nsmb.d DOL=${WORKDIR}/sys/main.dol -DOWNLOAD_LIK="http://newerteam.com/getNewerFile.php" +DOWNLOAD_LINK="http://newerteam.com/getNewerFile.php" +SOUNDTRACK_LINK="http://dirbaio.net/newer/NewerSoundtrack.zip" +SOUNDTRACK_ZIP="NewerSoundtrack.zip" RIIVOLUTION_ZIP=NewerSMBW.zip RIIVOLUTION_DIR=NewerFiles GAMENAME="Newer SMB"