Fixed a bug in Freedoom installer. Hopefully it works now.

This commit is contained in:
stormdragon2976 2023-05-07 19:28:28 -04:00
parent 6776479857
commit 504c95a84f

View File

@ -630,13 +630,12 @@ case "${game}" in
fi
doomPath="$(find /usr/share -type d -name "doom" 2> /dev/null | head -1)"
download "https://www.dropbox.com/s/turlowrn2s3l191/TobyAccessibilityMod_Version${tobyVersion}.zip?dl=0"
if [[ ! -e "${doomPath}/TobyDeluxeMapPack_V${tobyVersion}.pk3" ]]; then
mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom"
cp "${doomPath}/gzdoom.ini" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/"
grep -qx "Path=${doomPath}" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/gzdoom.ini" || \
sed -i "s;^\[IWADSearch.Directories\]$;[IWADSearch.Directories]\nPath=${doomPath};" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/gzdoom.ini"
sed -i 's/Mouse1=+attack/Control+=attack/' "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/gzdoom.ini"
fi
sudo unzip -d "${doomPath}" "${cache}/TobyAccessibilityMod_Version${tobyVersion}.zip"
mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom"
cp "${doomPath}/gzdoom.ini" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/"
grep -qx "Path=${doomPath}" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/gzdoom.ini" || \
sed -i "s;^\[IWADSearch.Directories\]$;[IWADSearch.Directories]\nPath=${doomPath};" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/gzdoom.ini"
sed -i 's/Mouse1=+attack/Control+=attack/' "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/gzdoom.ini"
# Unmodified Doom with accessibility.
add_launcher "$(command -v gzdoom) ${doomPath}/TobyAccModV${tobyVersion%-*}.pk3"
# Toby accessibility mods