From 32bf9ce340aab5fb8beadf45549b0e4f30db19f1 Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Sat, 15 Jun 2013 19:58:07 +0200 Subject: [PATCH] update for wip support of NewerSummerSun --- patchimage.sh | 13 ++++++++++++- script.d/common.sh | 10 +++++----- script.d/newersmb.sh | 6 ++++++ 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/patchimage.sh b/patchimage.sh index 2cbb1f8..e3d740b 100755 --- a/patchimage.sh +++ b/patchimage.sh @@ -7,6 +7,7 @@ # License: GPL v3 source ./script.d/common.sh +setup_tools optparse "${@}" @@ -20,6 +21,10 @@ case ${GAME} in source ./script.d/newersmb.sh ;; + B | NewerSummerSun ) + source ./script.d/newersummersun.sh + ;; + * ) echo -e "specified Game ${GAME} not recognized" exit 1 @@ -31,13 +36,19 @@ cleanup_prebuild check_input_image check_input_image_special check_riivolution_patch +prepare_riivolution_dir ${WIT} extract "${IMAGE}" ${WORKDIR} --psel=DATA -vv || exit 1 detect_game_version place_files -${PPF} a ${DOL} ${PATCH} +if [[ ${XML} ]]; then + XML_FILE="${XML_FILE}"${REG_LETTER}.xml + wit dolpatch ${DOL} xml="${XML_FILE}" "${XML_SOURCE}" +else + ${PPF} a ${DOL} ${PATCH} +fi if [[ ${CUSTOMID} ]]; then ${WIT} cp -v -B ${WORKDIR} ./${CUSTOMID}.wbfs -vv --disc-id=${CUSTOMID} ${TMD_OPTS} --name "${GAMENAME}" diff --git a/script.d/common.sh b/script.d/common.sh index 83c4080..316bf8f 100644 --- a/script.d/common.sh +++ b/script.d/common.sh @@ -30,12 +30,12 @@ cleanup () { ask_game () { -echo -e -"************************************************ +echo -e "************************************************ mknewersmb.sh Enter Letter for the Game you want to create: -A NewerSMB" +A NewerSMB +B Newer Summer Sun" read GAME @@ -58,7 +58,7 @@ check_input_image () { check_riivolution_patch () { - if [[ ! ${RIIVOLUTION}}; then + if [[ ! ${RIIVOLUTION}} ]]; then if [[ -e ./${RIIVOLUTION_ZIP} ]]; then unzip ./${RIIVOLUTION_ZIP} >/dev/null elif [[ ! -d ./${RIIVOLUTION_DIR} ]]; then @@ -155,7 +155,7 @@ while [[ $xcount -lt $pcount ]]; do echo -e "create wbfs images from riivolution patches.\n ***** using this script is only allowed, if you own an original copy of the game. ***** if you don't, no one can be blamed but you. Shame on you.\n ---game={NewerSMB} | specify game you want to create +--game={NewerSMB;NewerSummerSun} | specify game you want to create --iso=/home/test/.wbfs | specify which ISO to use for building --riivolution=/home/test/.zip | specify path to Riivolution files --version=EURv1,EURv2,USAv1,USAv2,JPNv1 | specify your game version diff --git a/script.d/newersmb.sh b/script.d/newersmb.sh index 22de437..e08b855 100644 --- a/script.d/newersmb.sh +++ b/script.d/newersmb.sh @@ -19,6 +19,12 @@ Supported Versions: EURv1, EURv2, USAv1, USAv2, JPNv1 } +prepare_riivolution_dir () { + + echo + +} + check_input_image_special () { if [[ ! ${IMAGE} ]]; then