Make -r work normally for single game installations, but provide a notice about manual intervention for multigame bottles.
This commit is contained in:
parent
c59918f6f4
commit
06138485ac
@ -467,14 +467,19 @@ game_removal() {
|
|||||||
wineExec="${wineExec##*\\}"
|
wineExec="${wineExec##*\\}"
|
||||||
# Confirm removal
|
# Confirm removal
|
||||||
get_bottle "${game%|*}"
|
get_bottle "${game%|*}"
|
||||||
read -rp "To remove the wine bottle \"${WINEPREFIX##*/}\" and all of its contents press enter. To cancel press control+c. " continue
|
# Make sure the game can be handled by remove
|
||||||
# kill any previous existing wineservers for this prefix in case they didn't shut down properly.
|
if [[ "${HOME}/.local/wine/${game%|*}" == "${WINEPREFIX}" ]]; then
|
||||||
wineserver -k
|
read -rp "To remove the wine bottle \"${WINEPREFIX##*/}\" and all of its contents press enter. To cancel press control+c. " continue
|
||||||
# remove the game
|
# kill any previous existing wineservers for this prefix in case they didn't shut down properly.
|
||||||
rm -rf "${WINEPREFIX}"
|
wineserver -k
|
||||||
|
# remove the game
|
||||||
|
rm -rf "${WINEPREFIX}"
|
||||||
|
else
|
||||||
|
read -rp "This bottle \"${WINEPREFIX##*/}\" contains multiple entries and must be handled manually. To remove only the launcher from the menu, press enter. To cancel press control+c. " continue
|
||||||
|
fi
|
||||||
# remove the launcher
|
# remove the launcher
|
||||||
gawk -i inplace -vLine="${WINEPREFIX//\\/\\\\}" '!index($0,Line)' "$configFile"
|
gawk -i inplace -vLine="${game//\\/\\\\}" '!index($0,Line)' "$configFile"
|
||||||
echo "The selected wine bottle has been deleted."
|
echo "The selected item has been deleted."
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user