From 5a5de54e4c393676053351a2f2d0b557bce2e872 Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Tue, 23 Aug 2016 18:19:26 +0200 Subject: [PATCH] - use 'read -er' instead of 'read -r' so that during user-input readline features like path-completion can be used. - in game information fix link to Pokemon Star Sapphire Thread --- ChangeLog | 5 +++++ scripts/common.sh | 2 +- scripts/kirbywii.sh | 2 +- scripts/mkwii/mkwiimm.sh | 2 +- scripts/mkwii/mkwiimm_fonts.sh | 4 ++-- scripts/mkwii/mkwiimm_items.sh | 6 +++--- scripts/mkwii/mkwiimm_karts.sh | 10 +++++----- scripts/mkwii/wiimmfi.sh | 2 +- scripts/nsmbw/nsmbw_characters.sh | 6 +++--- scripts/pokemon/pokemoneternalx.sh | 4 ++-- scripts/pokemon/pokemonneox.sh | 2 +- scripts/pokemon/pokemonneoy.sh | 2 +- scripts/pokemon/pokemonrutileruby.sh | 2 +- scripts/pokemon/pokemonstarsapphire.sh | 4 ++-- scripts/pokemon/pokemonwiltingy.sh | 4 ++-- scripts/tokyomiragesessionsfe.sh | 4 ++-- scripts/wiimmfi_generic.sh | 2 +- 17 files changed, 34 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6c4eef8..dc37f36 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,11 @@ v7.2.2: - when ${PWD} is writable that will be ${PWD}/patchimage_build, else it will be ${HOME}/patchimage_build +::misc. changes +- use 'read -er' instead of 'read -r' so that during user-input readline + features like path-completion can be used. +- in game information fix link to Pokemon Star Sapphire Thread + v7.2.1: ::bug fixes - fix ID for Kirby's Adventure Wii and Mario Kart Wii for US versions diff --git a/scripts/common.sh b/scripts/common.sh index ea25f85..7b9d58e 100644 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -31,7 +31,7 @@ echo "${SUPPORTED_GAMES_ALL} Enter ID or Short Name for the Game you want to build (multiple separated by space): " -read -r GAME +read -er GAME } diff --git a/scripts/kirbywii.sh b/scripts/kirbywii.sh index fbd962e..de5d9d6 100644 --- a/scripts/kirbywii.sh +++ b/scripts/kirbywii.sh @@ -66,7 +66,7 @@ pi_action () { 7 Restore to original type in a number." -read -r ID +read -er ID [[ ${ID} != [0-9] ]] && echo "invalid number provided from user-input." && exit 1 diff --git a/scripts/mkwii/mkwiimm.sh b/scripts/mkwii/mkwiimm.sh index ef58aa6..308b0cd 100644 --- a/scripts/mkwii/mkwiimm.sh +++ b/scripts/mkwii/mkwiimm.sh @@ -28,7 +28,7 @@ ALL Build all distributions." gawk -F : 'NR>1 {print $1 "\t" $2}' < "${PATCHIMAGE_DATABASE_DIR}"/mkwiimm.db echo " type in ALL or an ID (multiple separated by space)" - read -r ID + read -er ID } diff --git a/scripts/mkwii/mkwiimm_fonts.sh b/scripts/mkwii/mkwiimm_fonts.sh index 753a4ae..15a633a 100644 --- a/scripts/mkwii/mkwiimm_fonts.sh +++ b/scripts/mkwii/mkwiimm_fonts.sh @@ -24,7 +24,7 @@ check_input_image_special () { ask_input_image_mkwiimm echo -e "type RMC???.wbfs:\n" - read -r ID + read -er ID if [[ -f ${PWD}/${ID} ]]; then GAMEDIR="${PWD}" @@ -45,7 +45,7 @@ orig Original Mario Kart Wii Font" gawk -F : '{print $1 "\t\t" $2}' < "${PATCHIMAGE_DATABASE_DIR}"/mkwiimm_fonts.db echo -e "\ntype ???.szs or orig" - read -r FONT + read -er FONT if [[ ${FONT} != orig ]]; then if [[ ! -f ${PATCHIMAGE_DATA_DIR}/mkwiimm_fonts/${FONT} ]]; then diff --git a/scripts/mkwii/mkwiimm_items.sh b/scripts/mkwii/mkwiimm_items.sh index f6751ce..56352e2 100644 --- a/scripts/mkwii/mkwiimm_items.sh +++ b/scripts/mkwii/mkwiimm_items.sh @@ -24,7 +24,7 @@ check_input_image_special () { ask_input_image_mkwiimm echo -e "type RMC???.wbfs:\n" - read -r ID + read -er ID if [[ -f ${PWD}/${ID} ]]; then GAMEDIR="${PWD}" @@ -60,7 +60,7 @@ ask_items () { if [[ -f ${HOME}/.patchimage.choice ]]; then echo "Your choices from last time can be re-used." echo "y (yes) or n (no)" - read -r choice + read -er choice [[ ${choice} == y ]] && source "${HOME}"/.patchimage.choice fi @@ -77,7 +77,7 @@ orig Original item" gawk -F : "/${slot}/"'{print $1 "\t" $3}' < "${PATCHIMAGE_DATABASE_DIR}"/mkwiimm_items.db echo -e "\ntype orig or ???.brres" - read -r slotid + read -er slotid echo "<<<<<<>>>>>>" choosenitems=( ${choosenitems[@]} ${slot}:${slotid} ) done diff --git a/scripts/mkwii/mkwiimm_karts.sh b/scripts/mkwii/mkwiimm_karts.sh index aaafa02..3d50247 100644 --- a/scripts/mkwii/mkwiimm_karts.sh +++ b/scripts/mkwii/mkwiimm_karts.sh @@ -22,7 +22,7 @@ check_input_image_special () { ask_input_image_mkwiimm echo -e "type ALL or RMC???.wbfs:\n" - read -r ID + read -er ID if [[ -f ${PWD}/${ID} ]]; then GAMEDIR="${PWD}" @@ -39,12 +39,12 @@ ask_slot () { echo -e "\nFirst choose a vehicle to be replaced\n" gawk -F : '{print $1 "\t\t" $2}' < "${PATCHIMAGE_DATABASE_DIR}"/mkwiimm_vehicles.db echo -e "\ntype in ??_??? as in first column\n" - read -r VEHICLE + read -er VEHICLE echo -e "\nNow choose a character to be replaced\n" gawk -F : '{print $1 "\t\t" $2}' < "${PATCHIMAGE_DATABASE_DIR}"/mkwiimm_characters.db echo -e "\ntype in -?? as in first column\n" - read -r CHARACTER + read -er CHARACTER choosenkarts=( ${choosenkarts[@]} ${kart}:${VEHICLE}${CHARACTER} ) @@ -55,7 +55,7 @@ download_wiimm () { if [[ -f ${HOME}/.patchimage.choice ]]; then echo "Your choices from last time can be re-used." echo "y (yes) or n (no)" - read -r choice + read -er choice if [[ ${choice} == y ]]; then source "${HOME}"/.patchimage.choice @@ -66,7 +66,7 @@ download_wiimm () { echo -e "Choose a character to add to the game\n" gawk -F : '{print $1 "\t\t" $2}' < "${PATCHIMAGE_DATABASE_DIR}"/mkwiimm_karts.db echo -e "\ntype ???.szs (multiple possible, space separated)" - read -r KART + read -er KART for kart in "${KART[@]}"; do if [[ ! -f ${PATCHIMAGE_DATA_DIR}/mkwiimm_karts/${kart} ]]; then diff --git a/scripts/mkwii/wiimmfi.sh b/scripts/mkwii/wiimmfi.sh index 4e4a16f..515fc91 100644 --- a/scripts/mkwii/wiimmfi.sh +++ b/scripts/mkwii/wiimmfi.sh @@ -23,7 +23,7 @@ check_input_image_special () { ask_input_image_mkwiimm echo -e "type RMC???.wbfs:\n" - read -r ID + read -er ID if [[ -f ${PWD}/${ID} ]]; then GAMEDIR="${PWD}" diff --git a/scripts/nsmbw/nsmbw_characters.sh b/scripts/nsmbw/nsmbw_characters.sh index 2354060..c0cc46e 100644 --- a/scripts/nsmbw/nsmbw_characters.sh +++ b/scripts/nsmbw/nsmbw_characters.sh @@ -23,7 +23,7 @@ check_input_image_special () { ask_input_image_nsmb echo -e "type ??????.wbfs or ??????.iso:\n" - read -r ID + read -er ID if [[ -f ${PWD}/${ID} ]]; then GAMEDIR="${PWD}" @@ -40,7 +40,7 @@ pi_action () { if [[ -f ${HOME}/.patchimage.choice ]]; then echo "Your choices from last time can be re-used." echo "y (yes) or n (no)" - read -r choice + read -er choice [[ ${choice} == y ]] && source "${HOME}"/.patchimage.choice fi @@ -51,7 +51,7 @@ pi_action () { echo -e "\ntype ???.arc (only one per slot (second column) possible, space separated) or type 'restore' to only restore original characters. " - read -r PLAYERS + read -er PLAYERS fi rm -rf workdir diff --git a/scripts/pokemon/pokemoneternalx.sh b/scripts/pokemon/pokemoneternalx.sh index 2a4a402..dcdd0b8 100644 --- a/scripts/pokemon/pokemoneternalx.sh +++ b/scripts/pokemon/pokemoneternalx.sh @@ -36,7 +36,7 @@ viola_nerf () { enter either 'nerf' or press [Enter] to keep: " - read -r choice + read -er choice case ${choice} in [nN]erf ) HANS_EXTRA_PATH="${HANS_PATH}/Viola Nerf Files" ;; @@ -63,7 +63,7 @@ Encounter type changes the wild Pokemon availability: enter either 'legal', 'rebalanced' or 'insanity': " - read -r choice + read -er choice case ${choice} in [lL]egal ) HANS_PATH="${RIIVOLUTION_DIR}/Legal version" diff --git a/scripts/pokemon/pokemonneox.sh b/scripts/pokemon/pokemonneox.sh index c5f7262..efc5881 100644 --- a/scripts/pokemon/pokemonneox.sh +++ b/scripts/pokemon/pokemonneox.sh @@ -41,7 +41,7 @@ check_hans_files () { enter either 'full' or 'lite': " - read -r choice + read -er choice case ${choice} in [fF]ull ) HANS_PATH="${RIIVOLUTION_DIR}"/Full/romfs ;; diff --git a/scripts/pokemon/pokemonneoy.sh b/scripts/pokemon/pokemonneoy.sh index a8bbb82..e613ab7 100644 --- a/scripts/pokemon/pokemonneoy.sh +++ b/scripts/pokemon/pokemonneoy.sh @@ -41,7 +41,7 @@ check_hans_files () { enter either 'full' or 'lite': " - read -r choice + read -er choice case ${choice} in [fF]ull ) HANS_PATH="${RIIVOLUTION_DIR}"/Full/romfs ;; diff --git a/scripts/pokemon/pokemonrutileruby.sh b/scripts/pokemon/pokemonrutileruby.sh index 05b702b..d00abfe 100644 --- a/scripts/pokemon/pokemonrutileruby.sh +++ b/scripts/pokemon/pokemonrutileruby.sh @@ -52,7 +52,7 @@ Encounter type changes the wild Pokemon availability: enter either 'legit', 'leveled' or '679': " - read -r choice + read -er choice case ${choice} in [lL]egit ) HANS_EXTRA_PATH="${RIIVOLUTION_DIR}/Encounter Type/Legit Build" ;; diff --git a/scripts/pokemon/pokemonstarsapphire.sh b/scripts/pokemon/pokemonstarsapphire.sh index 851d7d8..d565890 100644 --- a/scripts/pokemon/pokemonstarsapphire.sh +++ b/scripts/pokemon/pokemonstarsapphire.sh @@ -25,7 +25,7 @@ edited, and the level curve expects use of the Experience Share, which means that you level up very quickly. You should be hitting Level 100 by the time you get to the Elite Four. -Source: https://projectpokemon.org/forums/showthread -r.php?46315 +Source: https://projectpokemon.org/forums/showthread.php?46315 Base ROM: Pokemon Alpha Sapphire Supported Versions: US, EU, JAP ************************************************" @@ -52,7 +52,7 @@ Encounter type changes the wild Pokemon availability: enter either 'legit', 'leveled' or '679': " - read -r choice + read -er choice case ${choice} in [lL]egit ) HANS_EXTRA_PATH="${RIIVOLUTION_DIR}/Encounter Type/Legit Build" ;; diff --git a/scripts/pokemon/pokemonwiltingy.sh b/scripts/pokemon/pokemonwiltingy.sh index 173320c..69e9a04 100644 --- a/scripts/pokemon/pokemonwiltingy.sh +++ b/scripts/pokemon/pokemonwiltingy.sh @@ -36,7 +36,7 @@ viola_nerf () { enter either 'nerf' or press [Enter] to keep: " - read -r choice + read -er choice case choice in [nN]erf ) HANS_EXTRA_PATH="${HANS_PATH}/Viola Nerf Files" ;; @@ -63,7 +63,7 @@ Encounter type changes the wild Pokemon availability: enter either 'legal', 'rebalanced' or 'insanity': " - read -r choice + read -er choice case ${choice} in [lL]egal ) HANS_PATH="${RIIVOLUTION_DIR}/Legal version" diff --git a/scripts/tokyomiragesessionsfe.sh b/scripts/tokyomiragesessionsfe.sh index 7602bf0..e45ef1a 100644 --- a/scripts/tokyomiragesessionsfe.sh +++ b/scripts/tokyomiragesessionsfe.sh @@ -26,13 +26,13 @@ menu () { if [[ ! ${XDELTA_PATH} ]]; then echo -e "\nEnter path to the directory containing the delta patches:\n" - read -r XDELTA_PATH || exit 75 + read -er XDELTA_PATH || exit 75 else status=9 fi if [[ ! ${CPK_PATH} ]]; then echo -e "\nEnter path to the directory containing the game files (cpk):\n" - read -r CPK_PATH || exit 75 + read -er CPK_PATH || exit 75 else status=9 fi diff --git a/scripts/wiimmfi_generic.sh b/scripts/wiimmfi_generic.sh index 0ec0d57..7b94c10 100644 --- a/scripts/wiimmfi_generic.sh +++ b/scripts/wiimmfi_generic.sh @@ -24,7 +24,7 @@ check_input_image_special () { ask_input_image_wiimmfi echo -e "type ??????.wbfs (or ??????.iso):\n" - read -r ID + read -er ID if [[ -f ${PWD}/${ID} ]]; then GAMEDIR="${PWD}"