From 3f1cf468410fa8251f9cd6ccc84655a2e50652c1 Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Sun, 12 Jul 2015 19:59:08 +0200 Subject: [PATCH] NSMBW character mod now live --- script.d/common.sh | 7 ++++--- script.d/nsmbw_characters.sh | 3 +-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/script.d/common.sh b/script.d/common.sh index e2a286e..8d37eef 100644 --- a/script.d/common.sh +++ b/script.d/common.sh @@ -252,8 +252,9 @@ check_input_image_mkwiimm () { show_nsmb_db () { - ID=${1:0:6} - gawk -F \: "/^${ID}/"'{print $2}' \ + ID1=${1:0:3} + ID2=${1:4:2} + gawk -F \: "/^${ID1}\*${ID2}/"'{print $2}' \ < ${PATCHIMAGE_SCRIPT_DIR}/nsmbw.db || echo "** Unknown **" } @@ -288,7 +289,7 @@ ask_input_image_nsmb () { ALL patch all images" - for image in ${1}/MSN???.{iso,wbfs}; do + for image in ${1}/SMN???.{iso,wbfs} ${1}/SLF???.{iso,wbfs} ${1}/SMM???.{iso,wbfs} ${1}/SMV???.{iso,wbfs} ${1}/MRR???.{iso,wbfs}; do if [[ -e ${image} ]]; then echo " ${image##*/} $(show_nsmb_db ${image##*/})" fi diff --git a/script.d/nsmbw_characters.sh b/script.d/nsmbw_characters.sh index 8bf9dad..d1fdff6 100644 --- a/script.d/nsmbw_characters.sh +++ b/script.d/nsmbw_characters.sh @@ -64,9 +64,8 @@ pi_action () { && exit 57) fi slot=$(gawk -F \: "/^${player}/"'{print $2}' ${PATCHIMAGE_SCRIPT_DIR}/nsmbw_characters.db) - choosenplayers=( ${choosenplayers[@]} player:${slot} ) + choosenplayers=( ${choosenplayers[@]} ${player}:${slot} ) done - echo ${choosenplayers[@]} echo "choosenplayers=( ${choosenplayers[@]} )" > ${HOME}/.patchimage.choice