major simplification and speed up in wiimmfi: mario kart

This commit is contained in:
Christopher Roy Bratusek 2014-05-14 20:35:43 +02:00
parent 996585dfbe
commit 8223547c50

View File

@ -47,33 +47,22 @@ patch_wiimm () {
if [[ ${ID} == ALL ]]; then if [[ ${ID} == ALL ]]; then
for image in ${IMAGE%/*}/RMC???.{iso,wbfs}; do for image in ${IMAGE%/*}/RMC???.{iso,wbfs}; do
if [[ -e ${image} ]]; then if [[ -e ${image} ]]; then
ximg=${image##*} ln -s "${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
fi fi
done done
./create-image.sh >/dev/null
mv -v ./wiimmfi-images/* "${PATCHIMAGE_GAME_DIR}"/
else else
if [[ ! -f ${IMAGE%/*}/${ID} ]]; then if [[ ! -f ${IMAGE%/*}/${ID} ]]; then
echo "unvalid game passed from user-input. exit" echo "unvalid game passed from user-input. exit"
exit 1 exit 1
fi fi
cp -v ${IMAGE%/*}/${ID} . 2>/dev/null ln -s ${IMAGE%/*}/${ID} .
./create-image.sh >/dev/null ./create-image.sh >/dev/null
mv -v ./wiimmfi-images/${ID} "${PATCHIMAGE_GAME_DIR}"/ 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 fi
rm -rf ${HOME}/.patchimage/tools/wiimfi-patcher/ rm -rf ${HOME}/.patchimage/tools/wiimfi-patcher/