From 30975fc58abb0187bc302d9b769f44cb5b00e5d0 Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Sun, 11 May 2014 22:36:19 +0200 Subject: [PATCH] fix cover-downloads for wiimmfi --- patchimage.sh | 8 -------- script.d/wiimmfi.sh | 15 +++++++++++++-- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/patchimage.sh b/patchimage.sh index 5f7020c..0c25491 100755 --- a/patchimage.sh +++ b/patchimage.sh @@ -184,14 +184,6 @@ case ${GAME_TYPE} in "MKWIIMM") show_notes - if [[ ${PATCHIMAGE_COVER_DOWNLOAD} == TRUE ]]; then - echo "\n*** B) download_covers" - download_covers - if [[ ${ONLY_COVERS} ]]; then - exit 0 - fi - fi - echo -e "\n*** 1) check_input_image" check_input_image echo -e "\n*** 2) check_input_image_special" diff --git a/script.d/wiimmfi.sh b/script.d/wiimmfi.sh index 32965a1..6cf3ab5 100644 --- a/script.d/wiimmfi.sh +++ b/script.d/wiimmfi.sh @@ -47,10 +47,16 @@ patch_wiimm () { if [[ ${ID} == ALL ]]; then for image in ${IMAGE%/*}/RMC???.{iso,wbfs}; do if [[ -e ${image} ]]; then + ximg=${image##*} cp -v "${image}" . ./create-image.sh >/dev/null - mv -v ./wiimmfi-images/${image##*/} "${PATCHIMAGE_GAME_DIR}"/ - rm ${image##*/} + mv -v ./wiimmfi-images/${ximg} "${PATCHIMAGE_GAME_DIR}"/ + rm ${ximg} + + if [[ ${PATCHIMAGE_COVER_DOWNLOAD} == TRUE ]]; then + echo "\n*** Z) download_covers" + download_covers ${ximg/.*} + fi fi done else @@ -58,6 +64,11 @@ patch_wiimm () { ./create-image.sh >/dev/null mv -v ./wiimmfi-images/${ID} "${PATCHIMAGE_GAME_DIR}"/ rm -f ${ID} + + if [[ ${PATCHIMAGE_COVER_DOWNLOAD} == TRUE ]]; then + echo "\n*** Z) download_covers" + download_covers ${ID/.*} + fi fi rm -rf ${HOME}/.patchimage/tools/wiimfi-patcher/