Use /usr/bin/wine if nothing is set for the variable.

This commit is contained in:
Storm Dragon 2024-12-15 18:48:40 -05:00
parent b776b18cf2
commit b8eb927c2d

View File

@ -812,7 +812,7 @@ game_installer() {
# remove games
game_removal() {
wine="${wine:-wine}"
wine="${wine:-/usr/bin/wine}"
mapfile -t lines < <(sed -e '/^$/d' -e '/^[[:space:]]*#/d' "${configFile}" 2> /dev/null)
if [[ ${#lines} -eq 0 ]]; then
echo "No games found."
@ -1089,7 +1089,7 @@ game_launcher() {
fi
get_bottle "${game[0]}"
# make sure wine is actually set to something
export wine="${wine:-wine}"
export wine="${wine:-/usr/bin/wine}"
echo -n "launching "
${wine} --version
# kill any previous existing wineservers for this prefix in case they didn't shut down properly.
@ -1110,7 +1110,7 @@ game_launcher() {
fi
process_launcher-flags
custom_launch_parameters
${wine:-wine} start /d "${game[1]%\\*}" "${game[1]##*\\}" /realtime
${wine:-/usr/bin/wine} start /d "${game[1]%\\*}" "${game[1]##*\\}" /realtime
fi
exit 0
}
@ -1274,7 +1274,7 @@ done
# Install game based on the selection above.
# make sure wine is actually set to something
export wine="${wine:-wine}"
export wine="${wine:-/usr/bin/wine}"
[[ "$agmNoLaunch" != "true" ]] && winetricks sandbox
[[ "$agmNoLaunch" != "true" ]] && exit 0