mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2025-04-10 19:15:12 +00:00
BIOS_CHECKER: fixed bios search path
This commit is contained in:
parent
325525a9a6
commit
39c95b0129
|
@ -654,15 +654,15 @@
|
||||||
},
|
},
|
||||||
"prod.keys": {
|
"prod.keys": {
|
||||||
"system": "switch",
|
"system": "switch",
|
||||||
"description": "A file for Switch emulation in Ryujinx",
|
"description": "A file required for Switch emulation",
|
||||||
"required": "required",
|
"required": "required",
|
||||||
"paths": "bios/switch"
|
"paths": "bios/switch/keys"
|
||||||
},
|
},
|
||||||
"title.keys": {
|
"title.keys": {
|
||||||
"system": "switch",
|
"system": "switch",
|
||||||
"description": "A file for Switch emulation in Ryujinx",
|
"description": "A file required for Switch emulation",
|
||||||
"required": "required",
|
"required": "required",
|
||||||
"paths": "bios/switch"
|
"paths": "bios/switch/keys"
|
||||||
},
|
},
|
||||||
"pico8": {
|
"pico8": {
|
||||||
"system": "PICO-8",
|
"system": "PICO-8",
|
||||||
|
|
|
@ -1064,6 +1064,9 @@ configurator_check_bios_files() {
|
||||||
|
|
||||||
log d "Checking entry $bios_entry"
|
log d "Checking entry $bios_entry"
|
||||||
|
|
||||||
|
# Replace "bios/" with $bios_folder and "roms/" with $roms_folder
|
||||||
|
bios_paths=$(echo "$bios_paths" | sed "s|bios/|$bios_folder/|g" | sed "s|roms/|$roms_folder/|g")
|
||||||
|
|
||||||
# Skip if bios_file is empty
|
# Skip if bios_file is empty
|
||||||
if [[ ! -z "$bios_file" ]]; then
|
if [[ ! -z "$bios_file" ]]; then
|
||||||
bios_file_found="Yes"
|
bios_file_found="Yes"
|
||||||
|
@ -1071,7 +1074,7 @@ configurator_check_bios_files() {
|
||||||
|
|
||||||
IFS=', ' read -r -a paths_array <<< "$bios_paths"
|
IFS=', ' read -r -a paths_array <<< "$bios_paths"
|
||||||
for path in "${paths_array[@]}"; do
|
for path in "${paths_array[@]}"; do
|
||||||
if [[ ! -f "$bios_folder/$path/$bios_file" ]]; then
|
if [[ ! -f "$path/$bios_file" ]]; then
|
||||||
bios_file_found="No"
|
bios_file_found="No"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
@ -1080,7 +1083,7 @@ configurator_check_bios_files() {
|
||||||
if [[ $bios_file_found == "Yes" ]]; then
|
if [[ $bios_file_found == "Yes" ]]; then
|
||||||
IFS=', ' read -r -a md5_array <<< "$bios_md5"
|
IFS=', ' read -r -a md5_array <<< "$bios_md5"
|
||||||
for md5 in "${md5_array[@]}"; do
|
for md5 in "${md5_array[@]}"; do
|
||||||
if [[ $(md5sum "$bios_folder/$path/$bios_file" | awk '{ print $1 }') == "$md5" ]]; then
|
if [[ $(md5sum "$path/$bios_file" | awk '{ print $1 }') == "$md5" ]]; then
|
||||||
bios_md5_matched="Yes"
|
bios_md5_matched="Yes"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
@ -1088,6 +1091,8 @@ configurator_check_bios_files() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
log d "BIOS file found: $bios_file_found, Hash matched: $bios_md5_matched"
|
log d "BIOS file found: $bios_file_found, Hash matched: $bios_md5_matched"
|
||||||
|
log d "Expected path: $path/$bios_file"
|
||||||
|
log d "Expected MD5: $bios_md5"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue