mirror of
https://gitlab.com/Nanolx/patchimage.git
synced 2024-12-18 05:21:49 +01:00
wiimmfi_generic.sh: minor fixes and code review
This commit is contained in:
parent
f616363898
commit
3ca3901fd2
@ -8,7 +8,7 @@ show_notes () {
|
||||
|
||||
echo -e \
|
||||
"************************************************
|
||||
${GAMENAME}
|
||||
${GAME_NAME}
|
||||
|
||||
Patches Mario Kart Wii to use Wiimm's custom server
|
||||
|
||||
@ -24,12 +24,12 @@ check_input_image_special () {
|
||||
ask_input_image_wiimmfi
|
||||
|
||||
echo -e "type ??????.wbfs (or ??????.iso):\n"
|
||||
read ID
|
||||
read -r ID
|
||||
|
||||
if [[ -f ${PWD}/${ID} ]]; then
|
||||
GAMEDIR=${PWD}
|
||||
GAMEDIR="${PWD}"
|
||||
elif [[ -f ${PATCHIMAGE_WBFS_DIR}/${ID} ]]; then
|
||||
GAMEDIR=${PATCHIMAGE_WBFS_DIR}
|
||||
GAMEDIR="${PATCHIMAGE_WBFS_DIR}"
|
||||
else echo "invalid user input."
|
||||
exit 75
|
||||
fi
|
||||
@ -38,15 +38,15 @@ check_input_image_special () {
|
||||
|
||||
pi_action () {
|
||||
|
||||
cp -v ${GAMEDIR}/${ID} . 2>/dev/null
|
||||
${WIT} cp -o ${ID} --DEST "${PATCHIMAGE_GAME_DIR}"/${ID} \
|
||||
cp -v "${GAMEDIR}"/"${ID}" . 2>/dev/null
|
||||
"${WIT}" cp -o "${ID}" --DEST "${PATCHIMAGE_GAME_DIR}"/"${ID}" \
|
||||
--update --psel=data --wiimmfi >/dev/null || \
|
||||
( echo "wiimmfi-ing the images failed." && exit 69 )
|
||||
rm -f ${ID}
|
||||
rm -f "${ID}"
|
||||
|
||||
if [[ ${PATCHIMAGE_COVER_DOWNLOAD} == TRUE ]]; then
|
||||
echo -e "\n*** Z) download_covers"
|
||||
download_covers ${ID/.*}
|
||||
download_covers "${ID/.*}"
|
||||
fi
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user