mirror of
https://gitlab.com/Nanolx/patchimage.git
synced 2024-11-01 07:15:06 +01:00
fixup image and rom detection (really now)
This commit is contained in:
parent
8ee2af1489
commit
b9b1a7942b
@ -220,18 +220,23 @@ check_input_image () {
|
|||||||
|
|
||||||
x=0
|
x=0
|
||||||
if [[ ! ${IMAGE} ]]; then
|
if [[ ! ${IMAGE} ]]; then
|
||||||
if test -f "${WBFS_MASK}".wbfs; then
|
WBFS0=$(find . -maxdepth 1 -name "${WBFS_MASK}".wbfs)
|
||||||
|
WBFS1=$(find "${PATCHIMAGE_WBFS_DIR}" -name "${WBFS_MASK}".wbfs)
|
||||||
|
ISO0=$(find . -maxdepth 1 -name "${WBFS_MASK}".iso)
|
||||||
|
ISO1=$(find "${PATCHIMAGE_WBFS_DIR}" -name "${WBFS_MASK}".iso)
|
||||||
|
|
||||||
|
if [[ -f ${WBFS0} ]]; then
|
||||||
x=1
|
x=1
|
||||||
IMAGE="${WBFS_MASK}".wbfs
|
IMAGE=${WBFS0}
|
||||||
elif test -f "${WBFS_MASK}".iso; then
|
elif [[ -f ${ISO0} ]]; then
|
||||||
x=2
|
x=2
|
||||||
IMAGE="${WBFS_MASK}".iso
|
IMAGE=${ISO0}
|
||||||
elif test -f "${PATCHIMAGE_WBFS_DIR}"/"${WBFS_MASK}".iso; then
|
elif [[ -f ${WBFS1} ]]; then
|
||||||
x=3
|
x=3
|
||||||
IMAGE="${PATCHIMAGE_WBFS_DIR}"/"${WBFS_MASK}".iso
|
IMAGE=${WBFS1}
|
||||||
elif test -f "${PATCHIMAGE_WBFS_DIR}"/"${WBFS_MASK}".wbfs; then
|
elif [[ -f ${ISO1} ]]; then
|
||||||
x=4
|
x=4
|
||||||
IMAGE="${PATCHIMAGE_WBFS_DIR}"/"${WBFS_MASK}".wbfs
|
IMAGE=${ISO1}
|
||||||
else
|
else
|
||||||
echo -e "please specify image to use with --iso=<path>"
|
echo -e "please specify image to use with --iso=<path>"
|
||||||
exit 15
|
exit 15
|
||||||
@ -239,21 +244,23 @@ check_input_image () {
|
|||||||
fi
|
fi
|
||||||
echo "*** >> status: ${x}"
|
echo "*** >> status: ${x}"
|
||||||
|
|
||||||
|
IMAGE=$(readlink -m "${IMAGE}")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
check_input_rom () {
|
check_input_rom () {
|
||||||
|
|
||||||
x=5
|
x=5
|
||||||
if [[ ! ${ROM} ]]; then
|
if [[ ! ${ROM} ]]; then
|
||||||
ROM=$(find . -name "${ROM_MASK}" | sed -e 's,./,,')
|
ROM0=$(find . -maxdepth 1 -name "${ROM_MASK}")
|
||||||
if [[ -f ${ROM} ]]; then
|
ROM1=$(find "${PATCHIMAGE_3DS_DIR}" -name "${ROM_MASK}")
|
||||||
|
|
||||||
|
if [[ -f ${ROM0} ]]; then
|
||||||
x=6
|
x=6
|
||||||
ROM="${ROM}"
|
ROM=${ROM0}
|
||||||
else
|
elif [[ -f ${ROM1} ]]; then
|
||||||
ROM=$(find "${PATCHIMAGE_3DS_DIR}" -name "${ROM_MASK}")
|
|
||||||
if [[ -f ${ROM} ]]; then
|
|
||||||
x=7
|
x=7
|
||||||
ROM="${ROM}"
|
ROM=${ROM1}
|
||||||
else
|
else
|
||||||
if [[ ! ${HANS_MULTI_SOURCE} ]]; then
|
if [[ ! ${HANS_MULTI_SOURCE} ]]; then
|
||||||
echo -e "error: could not find suitable ROM, specify using --rom"
|
echo -e "error: could not find suitable ROM, specify using --rom"
|
||||||
@ -261,8 +268,9 @@ check_input_rom () {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
echo "*** >> status: ${x}"
|
echo "*** >> status: ${x}"
|
||||||
|
|
||||||
|
ROM=$(readlink -m "${ROM}")
|
||||||
}
|
}
|
||||||
|
|
||||||
show_nsmb_db () {
|
show_nsmb_db () {
|
||||||
|
Loading…
Reference in New Issue
Block a user