diff --git a/patchimage.sh b/patchimage.sh index d77ad6e..c032c89 100755 --- a/patchimage.sh +++ b/patchimage.sh @@ -40,24 +40,28 @@ case ${GAME} in esac -show_notes -download_soundtrack -cleanup_prebuild -check_input_image -check_input_image_special -check_riivolution_patch +case ${GAME_TYPE} in + "RIIVOLUTION" ) + show_notes + download_soundtrack + cleanup_prebuild + check_input_image + check_input_image_special + check_riivolution_patch -${WIT} extract "${IMAGE}" ${WORKDIR} --psel=DATA -vv || exit 1 + ${WIT} extract "${IMAGE}" ${WORKDIR} --psel=DATA -vv || exit 1 -detect_game_version -place_files + detect_game_version + place_files -prepare_xml -${WIT} dolpatch ${DOL} xml="${XML_FILE}" --source "${XML_SOURCE}" -dolpatch_extra + prepare_xml + ${WIT} dolpatch ${DOL} xml="${XML_FILE}" --source "${XML_SOURCE}" + dolpatch_extra -if [[ ${CUSTOMID} ]]; then - ${WIT} cp -v -B ${WORKDIR} ${CUSTOMID}.wbfs -vv --disc-id=${CUSTOMID} ${TMD_OPTS} --name "${GAMENAME}" -else - ${WIT} cp -v -B ${WORKDIR} ${GAMEID}.wbfs -vv --disc-id=${GAMEID} ${TMD_OPTS} --name "${GAMENAME}" -fi + if [[ ${CUSTOMID} ]]; then + ${WIT} cp -v -B ${WORKDIR} ${CUSTOMID}.wbfs -vv --disc-id=${CUSTOMID} ${TMD_OPTS} --name "${GAMENAME}" + else + ${WIT} cp -v -B ${WORKDIR} ${GAMEID}.wbfs -vv --disc-id=${GAMEID} ${TMD_OPTS} --name "${GAMENAME}" + fi + ;; +esac diff --git a/script.d/anothersmb.sh b/script.d/anothersmb.sh index c2811e4..58e4bb2 100644 --- a/script.d/anothersmb.sh +++ b/script.d/anothersmb.sh @@ -10,6 +10,7 @@ RIIVOLUTION_DIR="Another" GAMENAME="Another Super Mario Brothers Wii 2.0" XML_SOURCE="${RIIVOLUTION_DIR}" XML_FILE="Riivolution/Another.xml" +GAME_TYPE=RIIVOLUTION show_notes () { diff --git a/script.d/newerholiday.sh b/script.d/newerholiday.sh index c3c1970..f74342c 100644 --- a/script.d/newerholiday.sh +++ b/script.d/newerholiday.sh @@ -10,6 +10,7 @@ RIIVOLUTION_DIR="XmasNewer" GAMENAME="Newer: Holiday Special" XML_SOURCE="${RIIVOLUTION_DIR}" XML_FILE="riivolution/Xmas" +GAME_TYPE=RIIVOLUTION show_notes () { diff --git a/script.d/newersmb.sh b/script.d/newersmb.sh index 45af168..e1fb1f9 100644 --- a/script.d/newersmb.sh +++ b/script.d/newersmb.sh @@ -10,6 +10,7 @@ RIIVOLUTION_DIR="NewerFiles" GAMENAME="Newer SMB" XML_SOURCE="${RIIVOLUTION_DIR}"/NewerSMBW/ XML_FILE="${RIIVOLUTION_DIR}"/riivolution/NewerSMBW.xml +GAME_TYPE=RIIVOLUTION show_notes () { diff --git a/script.d/newersummersun.sh b/script.d/newersummersun.sh index 8b6c6bd..50e9672 100644 --- a/script.d/newersummersun.sh +++ b/script.d/newersummersun.sh @@ -10,6 +10,7 @@ RIIVOLUTION_DIR="Newer Summer Sun" GAMENAME="Newer Summer Sun" XML_SOURCE="${RIIVOLUTION_DIR}"/SumSun/ XML_FILE="${RIIVOLUTION_DIR}"/riivolution/SumSun +GAME_TYPE=RIIVOLUTION show_notes () {