mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-24 23:15:39 +00:00
Migrate existing configurator-related functions to configurator_functions.sh
This commit is contained in:
parent
8a6a6551b0
commit
6524ff1beb
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
|
||||
check_bios_files() {
|
||||
# This function validates all the BIOS files listed in the $bios_checklist and adds the results to an array called bios_checked_list which can be used elsewhere
|
||||
# There is a "basic" and "expert" mode which outputs different levels of data
|
||||
# USAGE: check_bios_files "mode"
|
||||
|
||||
rm -f "$godot_bios_files_checked" # Godot data transfer temp files
|
||||
touch "$godot_bios_files_checked"
|
||||
|
||||
while IFS="^" read -r bios_file bios_subdir bios_hash bios_system bios_desc
|
||||
do
|
||||
bios_file_found="No"
|
||||
bios_hash_matched="No"
|
||||
if [[ -f "$bios_folder/$bios_subdir$bios_file" ]]; then
|
||||
bios_file_found="Yes"
|
||||
if [[ $bios_hash == "Unknown" ]]; then
|
||||
bios_hash_matched="Unknown"
|
||||
elif [[ $(md5sum "$bios_folder/$bios_subdir$bios_file" | awk '{ print $1 }') == "$bios_hash" ]]; then
|
||||
bios_hash_matched="Yes"
|
||||
fi
|
||||
fi
|
||||
if [[ "$1" == "basic" ]]; then
|
||||
bios_checked_list=("${bios_checked_list[@]}" "$bios_file" "$bios_system" "$bios_file_found" "$bios_hash_matched" "$bios_desc")
|
||||
echo "$bios_file"^"$bios_system"^"$bios_file_found"^"$bios_hash_matched"^"$bios_desc" >> "$godot_bios_files_checked" # Godot data transfer temp file
|
||||
else
|
||||
bios_checked_list=("${bios_checked_list[@]}" "$bios_file" "$bios_system" "$bios_file_found" "$bios_hash_matched" "$bios_desc" "$bios_subdir" "$bios_hash")
|
||||
echo "$bios_file"^"$bios_system"^"$bios_file_found"^"$bios_hash_matched"^"$bios_desc"^"$bios_subdir"^"$bios_hash" >> "$godot_bios_files_checked" # Godot data transfer temp file
|
||||
fi
|
||||
done < $bios_checklist
|
||||
}
|
|
@ -286,36 +286,6 @@ dir_prep() {
|
|||
log i "$symlink is now $real"
|
||||
}
|
||||
|
||||
check_bios_files() {
|
||||
# This function validates all the BIOS files listed in the $bios_checklist and adds the results to an array called bios_checked_list which can be used elsewhere
|
||||
# There is a "basic" and "expert" mode which outputs different levels of data
|
||||
# USAGE: check_bios_files "mode"
|
||||
|
||||
rm -f "$godot_bios_files_checked" # Godot data transfer temp files
|
||||
touch "$godot_bios_files_checked"
|
||||
|
||||
while IFS="^" read -r bios_file bios_subdir bios_hash bios_system bios_desc
|
||||
do
|
||||
bios_file_found="No"
|
||||
bios_hash_matched="No"
|
||||
if [[ -f "$bios_folder/$bios_subdir$bios_file" ]]; then
|
||||
bios_file_found="Yes"
|
||||
if [[ $bios_hash == "Unknown" ]]; then
|
||||
bios_hash_matched="Unknown"
|
||||
elif [[ $(md5sum "$bios_folder/$bios_subdir$bios_file" | awk '{ print $1 }') == "$bios_hash" ]]; then
|
||||
bios_hash_matched="Yes"
|
||||
fi
|
||||
fi
|
||||
if [[ "$1" == "basic" ]]; then
|
||||
bios_checked_list=("${bios_checked_list[@]}" "$bios_file" "$bios_system" "$bios_file_found" "$bios_hash_matched" "$bios_desc")
|
||||
echo "$bios_file"^"$bios_system"^"$bios_file_found"^"$bios_hash_matched"^"$bios_desc" >> "$godot_bios_files_checked" # Godot data transfer temp file
|
||||
else
|
||||
bios_checked_list=("${bios_checked_list[@]}" "$bios_file" "$bios_system" "$bios_file_found" "$bios_hash_matched" "$bios_desc" "$bios_subdir" "$bios_hash")
|
||||
echo "$bios_file"^"$bios_system"^"$bios_file_found"^"$bios_hash_matched"^"$bios_desc"^"$bios_subdir"^"$bios_hash" >> "$godot_bios_files_checked" # Godot data transfer temp file
|
||||
fi
|
||||
done < $bios_checklist
|
||||
}
|
||||
|
||||
update_rpcs3_firmware() {
|
||||
create_dir "$roms_folder/ps3/tmp"
|
||||
chmod 777 "$roms_folder/ps3/tmp"
|
||||
|
@ -699,7 +669,7 @@ ponzu() {
|
|||
rm -rf "$rdhome/ponzu"
|
||||
}
|
||||
|
||||
ponzu_remove(){
|
||||
ponzu_remove() {
|
||||
|
||||
# Call me with yuzu or citra and I will remove them
|
||||
|
||||
|
|
Loading…
Reference in a new issue