mirror of
https://github.com/dragoonDorise/EmuDeck.git
synced 2024-05-20 13:17:55 -04:00
generateGameList , all systems but ps3 and proton for now
This commit is contained in:
parent
73f38af040
commit
5681c86c9e
|
@ -1,20 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
generateGameLists() {
|
||||
ROMS_DIR="$romsPath/snes"
|
||||
ROMS_DIR="$romsPath"
|
||||
|
||||
# Initialize an empty array in JSON format
|
||||
printf "["
|
||||
|
||||
first_system=true
|
||||
|
||||
for system_dir in "$ROMS_DIR"*; do
|
||||
for system_dir in "$ROMS_DIR"/*; do
|
||||
if [[ -d "$system_dir" && -f "$system_dir/metadata.txt" ]]; then
|
||||
|
||||
# Ignore directories named "ps3"
|
||||
if [[ "$system_dir" == *"/ps3" ]]; then
|
||||
continue
|
||||
fi
|
||||
if [[ "$system_dir" == *"/xbox360" ]]; then
|
||||
continue
|
||||
fi
|
||||
if [[ "$system_dir" == *"/model2" ]]; then
|
||||
continue
|
||||
fi
|
||||
if [[ "$system_dir" == *"/genesiswide" ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
file_count=$(find "$system_dir" -type f | wc -l)
|
||||
if [[ "$file_count" -le 2 ]]; then
|
||||
|
@ -23,7 +31,8 @@ generateGameLists() {
|
|||
|
||||
collection=$(grep 'collection:' "$system_dir/metadata.txt" | cut -d ':' -f 2- | awk '{$1=$1};1')
|
||||
shortname=$(grep 'shortname:' "$system_dir/metadata.txt" | cut -d ':' -f 2- | awk '{$1=$1};1')
|
||||
launcher=$(grep 'launch:' "$system_dir/metadata.txt" | cut -d ':' -f 2- | awk '{$1=$1};1')
|
||||
# launcher=$(grep 'launch:' "$system_dir/metadata.txt" | cut -d ':' -f 2- | awk '{$1=$1};1')
|
||||
launcher=$(grep 'launch:' "$system_dir/metadata.txt" | cut -d ':' -f 2- | awk '{$1=$1};1' | sed 's/"/\\"/g')
|
||||
extensions=$(grep 'extensions:' "$system_dir/metadata.txt" | cut -d ':' -f 2- | tr ',' ' ' | awk '{$1=$1};1')
|
||||
|
||||
if $first_system; then
|
||||
|
|
Loading…
Reference in a new issue