From 8223547c50df206e622425e5f883f255a9faa8a9 Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Wed, 14 May 2014 20:35:43 +0200 Subject: [PATCH] major simplification and speed up in wiimmfi: mario kart --- script.d/wiimmfi.sh | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/script.d/wiimmfi.sh b/script.d/wiimmfi.sh index aecd31b..7ae3d3b 100644 --- a/script.d/wiimmfi.sh +++ b/script.d/wiimmfi.sh @@ -47,33 +47,22 @@ 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/${ximg} "${PATCHIMAGE_GAME_DIR}"/ - rm ${ximg} - - if [[ ${PATCHIMAGE_COVER_DOWNLOAD} == TRUE ]]; then - echo "\n*** Z) download_covers" - download_covers ${ximg/.*} - fi + ln -s "${image}" . fi done + + ./create-image.sh >/dev/null + mv -v ./wiimmfi-images/* "${PATCHIMAGE_GAME_DIR}"/ + else if [[ ! -f ${IMAGE%/*}/${ID} ]]; then echo "unvalid game passed from user-input. exit" exit 1 fi - cp -v ${IMAGE%/*}/${ID} . 2>/dev/null + ln -s ${IMAGE%/*}/${ID} . ./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/