Merge pull request #814 from icenine451/cooker-0.8.2b-icenine451

Cooker 0.8.2b icenine451
This commit is contained in:
icenine451 2024-06-21 21:32:51 -04:00 committed by GitHub
commit ac992bb8a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 33 additions and 17 deletions

View file

@ -42,6 +42,14 @@ find_empty_rom_folders() {
empty_rom_folders_list=()
all_empty_folders=()
all_helper_files=()
while IFS='^' read -r file dest
do
if [[ ! "$file" == "#"* ]] && [[ ! -z "$file" ]]; then
all_helper_files=("${all_helper_files[@]}" "$file")
fi
done < "$helper_files_list"
for system in $(find "$roms_folder" -mindepth 1 -maxdepth 1 -type d -printf '%f\n')
do
@ -59,6 +67,21 @@ find_empty_rom_folders() {
empty_rom_folders_list=("${empty_rom_folders_list[@]}" "false" "$(realpath $dir)")
all_empty_folders=("${all_empty_folders[@]}" "$(realpath $dir)")
echo "$(realpath $dir)" >> "$godot_empty_roms_folders" # Godot data transfer temp file
elif [[ $count -eq 2 ]] && [[ "$files" =~ "systeminfo.txt" ]]; then
# Directory contains 2 files, one of which is "systeminfo.txt"
for helper_file in ${all_helper_files[@]} # Compare helper file list to dir file list
do
if [[ "$files" =~ "$helper_file" ]]; then
contains_helper_file="true" # Helper file was found
break
fi
done
if [[ "$contains_helper_file" == "true" ]]; then
# Directory contains only systeminfo.txt and a helper file
empty_rom_folders_list=("${empty_rom_folders_list[@]}" "false" "$(realpath $dir)")
all_empty_folders=("${all_empty_folders[@]}" "$(realpath $dir)")
echo "$(realpath $dir)" >> "$godot_empty_roms_folders" # Godot data transfer temp file
fi
fi
done
}

View file

@ -560,7 +560,6 @@ deploy_helper_files() {
eval current_dest="$dest"
cp -f "$helper_files_folder/$file" "$current_dest/$file"
fi
done < "$helper_files_list"
}

View file

@ -853,7 +853,7 @@ prepare_component() {
sed -i 's#RETRODECKSAVESDIR#'$saves_folder'#g' "/var/config/gzdoom/gzdoom.ini" # This is an unfortunate one-off because set_setting_value does not currently support JSON
fi
if [[ $component_found="false" ]]; then
if [[ $component_found == "false" ]]; then
log e "Supplied component $component not found, not resetting"
fi

View file

@ -586,15 +586,9 @@ configurator_retrodeck_tools_dialog() {
"Tool: Remove Empty ROM Folders" )
log i "Configurator: opening \"$choice\" menu"
(
find_empty_rom_folders
) |
zenity --progress --no-cancel --pulsate --auto-close \
--icon-name=net.retrodeck.retrodeck \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title="Finding Empty ROM Folders" \
--width=400 --height=200 \
--text="Finding empty ROM folders, please be patient.\n\n"
configurator_generic_dialog "RetroDECK Configurator - Remove Empty ROM Folders" "Searching for empty rom folders, please be patient..."
find_empty_rom_folders
choice=$(zenity \
--list --width=1200 --height=720 --title "RetroDECK Configurator - RetroDECK: Remove Empty ROM Folders" \