From d1f95e02ef9cdf0613a92af767b86075b5ad2e65 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Fri, 13 Sep 2024 01:28:22 -0400 Subject: [PATCH] Migrated the game removal function over to the new system. --- audiogame-manager.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index c841379..b83450b 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -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")