Add check for existing compressed format when building compressable files list

This commit is contained in:
icenine451 2024-06-26 12:43:56 -04:00
parent 00ee6e1279
commit 7f62bd089b

View file

@ -155,19 +155,19 @@ find_compatible_games() {
do
local compatible_compression_format=$(find_compatible_compression_format "$game")
if [[ $compression_format == "chd" ]]; then
if [[ $compatible_compression_format == "chd" ]]; then
if [[ $compatible_compression_format == "chd" && ! -f "$(echo ${game%.*}.chd)" ]]; then
all_compressable_games=("${all_compressable_games[@]}" "$game")
compressable_games_list=("${compressable_games_list[@]}" "false" "${game#$roms_folder}" "$game")
echo "${game}"^"$compatible_compression_format" >> "$godot_compression_compatible_games"
fi
elif [[ $compression_format == "zip" ]]; then
if [[ $compatible_compression_format == "zip" ]]; then
if [[ $compatible_compression_format == "zip" && ! -f "$(echo ${game%.*}.zip)" ]]; then
all_compressable_games=("${all_compressable_games[@]}" "$game")
compressable_games_list=("${compressable_games_list[@]}" "false" "${game#$roms_folder}" "$game")
echo "${game}"^"$compatible_compression_format" >> "$godot_compression_compatible_games"
fi
elif [[ $compression_format == "rvz" ]]; then
if [[ $compatible_compression_format == "rvz" ]]; then
if [[ $compatible_compression_format == "rvz" && ! -f "$(echo ${game%.*}.rvz)" ]]; then
all_compressable_games=("${all_compressable_games[@]}" "$game")
compressable_games_list=("${compressable_games_list[@]}" "false" "${game#$roms_folder}" "$game")
echo "${game}"^"$compatible_compression_format" >> "$godot_compression_compatible_games"