updated the kill flag to work with the new get_bottle function.

This commit is contained in:
Storm Dragon 2021-06-17 15:32:09 -04:00
parent 316fc6a588
commit e6e6997002

View File

@ -466,14 +466,15 @@ game_removal() {
wineExec="${wineExec%|*}" wineExec="${wineExec%|*}"
wineExec="${wineExec##*\\}" wineExec="${wineExec##*\\}"
# Confirm removal # 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. # 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 # remove the game
rm -rf "${HOME}/.local/wine/${game%|*}" rm -rf "${HOME}/.local/wine/${bottle}"
# remove the launcher # remove the launcher
gawk -i inplace -vLine="${game//\\/\\\\}" '!index($0,Line)' "$configFile" gawk -i inplace -vLine="${bottle//\\/\\\\}" '!index($0,Line)' "$configFile"
echo "The selected game has been deleted." echo "The selected wine bottle has been deleted."
fi fi
exit 0 exit 0
} }
@ -511,7 +512,8 @@ kill_game() {
wineExec="${wineExec%|*}" wineExec="${wineExec%|*}"
wineExec="${wineExec##*\\}" wineExec="${wineExec##*\\}"
# kill the wine server. # kill the wine server.
WINEPREFIX="${HOME}/.local/wine/${game%|*}" wineserver -k get_bottle "${game%|*}"
wineserver -k
echo "The selected game has been stopped." echo "The selected game has been stopped."
fi fi
exit 0 exit 0