Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions scriptmodules/supplementary/skyscraper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,18 @@ function _check_ver_skyscraper() {
return 0
}

# List any non-empty systems found in the ROM folder
# Create intersection of systems configured according to ES frontend
# and non-empty ROM-folders (~/RetroPie/roms/<platform>/)
function _list_systems_skyscraper() {
find -L "$romdir/" -mindepth 1 -maxdepth 1 -type d -not -empty | sort -u
local es_cfg="emulationstation/es_systems.cfg"
if [[ -f "$home/.$es_cfg" ]]; then
es_cfg="$home/.$es_cfg"
else
es_cfg="/etc/$es_cfg"
fi
mapfile set_es < <(xmlstarlet select --template --value-of "/systemList/system/name/text()" "$es_cfg" | sed -e /retropie/d | sort -u)
mapfile set_fs < <(find -L "$romdir/" -mindepth 1 -maxdepth 1 -type d -not -empty -printf "%f\n" | sort)
comm -1 -2 <(printf '%s' "${set_es[@]}") <(printf '%s' "${set_fs[@]}")
}

function configure_skyscraper() {
Expand Down