Migrated the game removal function over to the new system.

This commit is contained in:
Storm Dragon 2024-09-13 01:28:22 -04:00
parent 29ead41c16
commit d1f95e02ef

View File

@ -741,7 +741,7 @@ game_installer() {
# remove games
game_removal() {
mapfile -t lines < <(sed '/^$/d' "${configFile}" 2> /dev/null)
mapfile -t lines < <(sed -e '/^$/d' -e '/^[[:space:]]*#/d' "${configFile}" 2> /dev/null)
if [[ ${#lines} -eq 0 ]]; then
echo "No games found."
exit 0
@ -749,7 +749,8 @@ game_removal() {
# Create the menu of installed games
declare -a menuList
for i in "${lines[@]}" ; do
menuList+=("${i%|*}" "${i##*|}")
IFS='|' read -ra gameInfo <<< "$i"
menuList+=("${gameInfo[0]}|${gameInfo[1]}" "${gameInfo[2]}")
done
menuList+=("Donate" "Donate")
menuList+=("Become a Patron" "Become a Patron")