fixup image / rom detection

This commit is contained in:
Christopher Roy Bratusek 2016-08-06 20:41:34 +02:00
parent 56285ecd3b
commit 991f72b958

View File

@ -220,18 +220,18 @@ check_input_image () {
x=0 x=0
if [[ ! ${IMAGE} ]]; then if [[ ! ${IMAGE} ]]; then
if test -f "${WBFS_MASK}".wbfs; then if test -f ${WBFS_MASK}.wbfs; then
x=1 x=1
IMAGE="${WBFS_MASK}".wbfs IMAGE=${WBFS_MASK}.wbfs
elif test -f "${WBFS_MASK}".iso; then elif test -f ${WBFS_MASK}.iso; then
x=2 x=2
IMAGE="${WBFS_MASK}".iso IMAGE=${WBFS_MASK}.iso
elif test -f "${PATCHIMAGE_WBFS_DIR}"/"${WBFS_MASK}".iso; then elif test -f "${PATCHIMAGE_WBFS_DIR}"/${WBFS_MASK}.iso; then
x=3 x=3
IMAGE="${PATCHIMAGE_WBFS_DIR}"/"${WBFS_MASK}".iso IMAGE="${PATCHIMAGE_WBFS_DIR}"/${WBFS_MASK}.iso
elif test -f "${PATCHIMAGE_WBFS_DIR}"/"${WBFS_MASK}".wbfs; then elif test -f "${PATCHIMAGE_WBFS_DIR}"/${WBFS_MASK}.wbfs; then
x=4 x=4
IMAGE="${PATCHIMAGE_WBFS_DIR}"/"${WBFS_MASK}".wbfs IMAGE="${PATCHIMAGE_WBFS_DIR}"/${WBFS_MASK}.wbfs
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
@ -245,21 +245,15 @@ check_input_rom () {
x=5 x=5
if [[ ! ${ROM} ]]; then if [[ ! ${ROM} ]]; then
ROM=$(find . -name "${ROM_MASK}" | sed -e 's,./,,') if test -f ${ROM_MASK}.cxi; then
if [[ -f ${ROM} ]]; then
x=6 x=6
ROM="${ROM}" ROM=${ROM_MASK}.cxi
elif test -f "${PATCHROM_3DS_DIR}"/${ROM_MASK}.iso; then
x=7
ROM="${PATCHROM_3DS_DIR}"/${ROM_MASK}.iso
else else
ROM=$(find "${PATCHIMAGE_3DS_DIR}" -name "${ROM_MASK}") echo -e "please specify rom to use with --rom=<path>"
if [[ -f ${ROM} ]]; then exit 15
x=7
ROM="${ROM}"
else
if [[ ! ${HANS_MULTI_SOURCE} ]]; then
echo -e "error: could not find suitable ROM, specify using --rom"
exit 15
fi
fi
fi fi
fi fi
echo "*** >> status: ${x}" echo "*** >> status: ${x}"