Migrated the game removal function over to the new system.
This commit is contained in:
parent
29ead41c16
commit
d1f95e02ef
@ -741,7 +741,7 @@ game_installer() {
|
|||||||
|
|
||||||
# remove games
|
# remove games
|
||||||
game_removal() {
|
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
|
if [[ ${#lines} -eq 0 ]]; then
|
||||||
echo "No games found."
|
echo "No games found."
|
||||||
exit 0
|
exit 0
|
||||||
@ -749,7 +749,8 @@ game_removal() {
|
|||||||
# Create the menu of installed games
|
# Create the menu of installed games
|
||||||
declare -a menuList
|
declare -a menuList
|
||||||
for i in "${lines[@]}" ; do
|
for i in "${lines[@]}" ; do
|
||||||
menuList+=("${i%|*}" "${i##*|}")
|
IFS='|' read -ra gameInfo <<< "$i"
|
||||||
|
menuList+=("${gameInfo[0]}|${gameInfo[1]}" "${gameInfo[2]}")
|
||||||
done
|
done
|
||||||
menuList+=("Donate" "Donate")
|
menuList+=("Donate" "Donate")
|
||||||
menuList+=("Become a Patron" "Become a Patron")
|
menuList+=("Become a Patron" "Become a Patron")
|
||||||
|
Loading…
Reference in New Issue
Block a user