mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-22 05:55:38 +00:00
Merge pull request #814 from icenine451/cooker-0.8.2b-icenine451
Cooker 0.8.2b icenine451
This commit is contained in:
commit
ac992bb8a0
|
@ -42,6 +42,14 @@ find_empty_rom_folders() {
|
||||||
|
|
||||||
empty_rom_folders_list=()
|
empty_rom_folders_list=()
|
||||||
all_empty_folders=()
|
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')
|
for system in $(find "$roms_folder" -mindepth 1 -maxdepth 1 -type d -printf '%f\n')
|
||||||
do
|
do
|
||||||
|
@ -59,6 +67,21 @@ find_empty_rom_folders() {
|
||||||
empty_rom_folders_list=("${empty_rom_folders_list[@]}" "false" "$(realpath $dir)")
|
empty_rom_folders_list=("${empty_rom_folders_list[@]}" "false" "$(realpath $dir)")
|
||||||
all_empty_folders=("${all_empty_folders[@]}" "$(realpath $dir)")
|
all_empty_folders=("${all_empty_folders[@]}" "$(realpath $dir)")
|
||||||
echo "$(realpath $dir)" >> "$godot_empty_roms_folders" # Godot data transfer temp file
|
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
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
|
@ -560,7 +560,6 @@ deploy_helper_files() {
|
||||||
eval current_dest="$dest"
|
eval current_dest="$dest"
|
||||||
cp -f "$helper_files_folder/$file" "$current_dest/$file"
|
cp -f "$helper_files_folder/$file" "$current_dest/$file"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done < "$helper_files_list"
|
done < "$helper_files_list"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
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
|
fi
|
||||||
|
|
||||||
if [[ $component_found="false" ]]; then
|
if [[ $component_found == "false" ]]; then
|
||||||
log e "Supplied component $component not found, not resetting"
|
log e "Supplied component $component not found, not resetting"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -586,15 +586,9 @@ configurator_retrodeck_tools_dialog() {
|
||||||
|
|
||||||
"Tool: Remove Empty ROM Folders" )
|
"Tool: Remove Empty ROM Folders" )
|
||||||
log i "Configurator: opening \"$choice\" menu"
|
log i "Configurator: opening \"$choice\" menu"
|
||||||
(
|
|
||||||
find_empty_rom_folders
|
configurator_generic_dialog "RetroDECK Configurator - Remove Empty ROM Folders" "Searching for empty rom folders, please be patient..."
|
||||||
) |
|
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"
|
|
||||||
|
|
||||||
choice=$(zenity \
|
choice=$(zenity \
|
||||||
--list --width=1200 --height=720 --title "RetroDECK Configurator - RetroDECK: Remove Empty ROM Folders" \
|
--list --width=1200 --height=720 --title "RetroDECK Configurator - RetroDECK: Remove Empty ROM Folders" \
|
||||||
|
|
Loading…
Reference in a new issue