From e6e69970028dfd4fca02677e7c0cd5e3d6d91b99 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Thu, 17 Jun 2021 15:32:09 -0400 Subject: [PATCH] updated the kill flag to work with the new get_bottle function. --- audiogame-manager.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index eeaf795..3912ada 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -466,14 +466,15 @@ game_removal() { wineExec="${wineExec%|*}" wineExec="${wineExec##*\\}" # Confirm removal - read -rp "To remove the wine bottle ${game%|*} and all of its contents press enter. To cancel press control+c. " continue + get_bottle "${game%|*}" + read -rp "To remove the wine bottle $bottle and all of its contents press enter. To cancel press control+c. " continue # kill any previous existing wineservers for this prefix in case they didn't shut down properly. - WINEPREFIX="${HOME}/.local/wine/${game%|*}" wineserver -k + WINEPREFIX="${HOME}/.local/wine/${bottle}" wineserver -k # remove the game - rm -rf "${HOME}/.local/wine/${game%|*}" + rm -rf "${HOME}/.local/wine/${bottle}" # remove the launcher - gawk -i inplace -vLine="${game//\\/\\\\}" '!index($0,Line)' "$configFile" - echo "The selected game has been deleted." + gawk -i inplace -vLine="${bottle//\\/\\\\}" '!index($0,Line)' "$configFile" + echo "The selected wine bottle has been deleted." fi exit 0 } @@ -511,7 +512,8 @@ kill_game() { wineExec="${wineExec%|*}" wineExec="${wineExec##*\\}" # kill the wine server. - WINEPREFIX="${HOME}/.local/wine/${game%|*}" wineserver -k + get_bottle "${game%|*}" + wineserver -k echo "The selected game has been stopped." fi exit 0