mirror of
https://gitlab.com/Nanolx/patchimage.git
synced 2024-11-24 10:09:22 +01:00
major bugfix and batch operation for MKWiimm generation
This commit is contained in:
parent
9dcd1d11b1
commit
05cfbb9ae8
@ -1,7 +1,10 @@
|
|||||||
v5.4.0:
|
v5.4.0:
|
||||||
|
- fixed major bug creating MKWiimm: image was not saved to proper
|
||||||
|
destination directory (now everything's fine)
|
||||||
- update wit to version 2.31a
|
- update wit to version 2.31a
|
||||||
- update szs to version 1.39a
|
- update szs to version 1.39a
|
||||||
- add support for MKWiimm 2015-03
|
- add support for MKWiimm 2015-03
|
||||||
|
- add support for creating multiple MKWiimm at once
|
||||||
- add support for replacing karts in MKWiimm
|
- add support for replacing karts in MKWiimm
|
||||||
The madness begins, feel free to test this out. downloaded
|
The madness begins, feel free to test this out. downloaded
|
||||||
karts are prefixed mkwiimm_kart_ to avoid naming collision
|
karts are prefixed mkwiimm_kart_ to avoid naming collision
|
||||||
|
@ -32,7 +32,7 @@ download_wiimm () {
|
|||||||
ALL Build all distributions."
|
ALL Build all distributions."
|
||||||
gawk -F \: 'NR>1 {print $1 "\t" $2}' < script.d/mkwiimm.db
|
gawk -F \: 'NR>1 {print $1 "\t" $2}' < script.d/mkwiimm.db
|
||||||
echo "
|
echo "
|
||||||
type in ALL or an ID"
|
type in ALL or an ID (multiple separated by space)"
|
||||||
read ID
|
read ID
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -59,9 +59,10 @@ wiimmfi () {
|
|||||||
|
|
||||||
build_mkwiimm () {
|
build_mkwiimm () {
|
||||||
|
|
||||||
DIST=$(gawk -F \: "/^${1}/"'{print $2}' < ${PATCHIMAGE_SCRIPT_DIR}/mkwiimm.db)
|
MY_ID=${1}
|
||||||
DOWNLOAD=$(gawk -F \: "/^${1}/"'{print $3}' < ${PATCHIMAGE_SCRIPT_DIR}/mkwiimm.db)
|
DIST=$(gawk -F \: "/^${MY_ID}/"'{print $2}' < ${PATCHIMAGE_SCRIPT_DIR}/mkwiimm.db)
|
||||||
FILENAME=$(gawk -F \: "/^${1}/"'{split($3, a, "/") ; print a[3]}' < ${PATCHIMAGE_SCRIPT_DIR}/mkwiimm.db)
|
DOWNLOAD=$(gawk -F \: "/^${MY_ID}/"'{print $3}' < ${PATCHIMAGE_SCRIPT_DIR}/mkwiimm.db)
|
||||||
|
FILENAME=$(gawk -F \: "/^${MY_ID}/"'{split($3, a, "/") ; print a[3]}' < ${PATCHIMAGE_SCRIPT_DIR}/mkwiimm.db)
|
||||||
|
|
||||||
if [[ ${FILENAME} != mkw* ]]; then
|
if [[ ${FILENAME} != mkw* ]]; then
|
||||||
echo "wrong ID passed from user-input, exiting."
|
echo "wrong ID passed from user-input, exiting."
|
||||||
@ -100,7 +101,7 @@ build_mkwiimm () {
|
|||||||
esac
|
esac
|
||||||
chmod +x *.sh
|
chmod +x *.sh
|
||||||
|
|
||||||
if [[ ${MKWIIMM_OVERRIDE_SZS} == "TRUE" || ${ID} -lt 23 ]]; then
|
if [[ ${MKWIIMM_OVERRIDE_SZS} == "TRUE" || ${MY_ID} -lt 23 ]]; then
|
||||||
cp -r ${PATCHIMAGE_SCRIPT_DIR}/../override/* ${PWD}/bin/
|
cp -r ${PATCHIMAGE_SCRIPT_DIR}/../override/* ${PWD}/bin/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -111,29 +112,38 @@ ISOMODE=wbfs
|
|||||||
SPLITISO=
|
SPLITISO=
|
||||||
PRIV_SAVEGAME=${MKWIIMM_OWN_SAVE}" > ${PWD}/config.def
|
PRIV_SAVEGAME=${MKWIIMM_OWN_SAVE}" > ${PWD}/config.def
|
||||||
|
|
||||||
echo "*** 6) creating >${DIST}<, stand by"
|
echo "*** 6) creating >${DIST}< (can take some time)"
|
||||||
./create-image.sh -a --dest=${PWD}/RMC${REG}${ID}.wbfs >/dev/null || exit 51
|
./create-image.sh -a --dest=${XD}/RMC${REG}${MY_ID}.wbfs >/dev/null || exit 51
|
||||||
else
|
else
|
||||||
echo "*** 6) creating >${DIST}<"
|
echo "*** 6) creating >${DIST}< (can take some time)"
|
||||||
./create-image.sh --dest=${PWD}/RMC${REG}${ID}.wbfs || exit 51
|
./create-image.sh --dest=${XD}/RMC${REG}${MY_ID}.wbfs || exit 51
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${ID} -lt 23 ]]; then
|
if [[ ${MY_ID} -lt 23 ]]; then
|
||||||
|
|
||||||
echo "*** 7) patching >${DIST}< to use custom server"
|
echo "*** 7) patching >${DIST}< to use custom server"
|
||||||
wiimmfi ${PWD}/RMC${REG}${ID}.wbfs || exit 69
|
wiimmfi ${XD}/RMC${REG}${MY_ID}.wbfs || exit 69
|
||||||
|
|
||||||
echo "*** 9) cleaning up workdir"
|
|
||||||
else
|
|
||||||
echo "*** 7) cleaning up workdir"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd ${XD}
|
cd ${XD}
|
||||||
|
|
||||||
|
if [[ ${MY_ID} -lt 23 ]]; then
|
||||||
|
echo "*** 8) storing game"
|
||||||
|
else echo "*** 7) storing game"
|
||||||
|
fi
|
||||||
|
echo " ${DIST} saved as ${PATCHIMAGE_GAME_DIR}/RMC${REG}${MY_ID}.wbfs"
|
||||||
|
mv RMC${REG}${MY_ID}.wbfs \
|
||||||
|
${PATCHIMAGE_GAME_DIR}/RMC${REG}${MY_ID}.wbfs
|
||||||
|
|
||||||
|
if [[ ${MY_ID} -lt 23 ]]; then
|
||||||
|
echo "*** 9) cleaning up workdir"
|
||||||
|
else
|
||||||
|
echo "*** 8) cleaning up workdir"
|
||||||
|
fi
|
||||||
rm -rf ${FILENAME/.7z}
|
rm -rf ${FILENAME/.7z}
|
||||||
|
|
||||||
if [[ ${PATCHIMAGE_COVER_DOWNLOAD} == TRUE ]]; then
|
if [[ ${PATCHIMAGE_COVER_DOWNLOAD} == TRUE ]]; then
|
||||||
echo -e "*** Z) download_covers\n"
|
echo -e "*** Z) download_covers\n"
|
||||||
download_covers RMC${REG}${ID}
|
download_covers RMC${REG}${MY_ID}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -141,12 +151,12 @@ PRIV_SAVEGAME=${MKWIIMM_OWN_SAVE}" > ${PWD}/config.def
|
|||||||
patch_wiimm () {
|
patch_wiimm () {
|
||||||
|
|
||||||
if [[ ${ID} == ALL ]]; then
|
if [[ ${ID} == ALL ]]; then
|
||||||
for ID in {06..26}; do
|
for ID in {06..27}; do
|
||||||
build_mkwiimm ${ID}
|
build_mkwiimm ${ID}
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
|
for game in ${ID[@]}; do
|
||||||
build_mkwiimm ${ID}
|
build_mkwiimm ${game}
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user