Use the new menu system. Unzip no longer overwrites existing files.

This commit is contained in:
Storm Dragon 2023-11-12 13:45:31 -05:00
parent e2b019dc55
commit 28dac62907

View File

@ -675,8 +675,8 @@ case "${game}" in
echo "The next step may require your password." echo "The next step may require your password."
echo "It is necessary to places the extracted files in their proper place." echo "It is necessary to places the extracted files in their proper place."
alert alert
sudo unzip -d "${doomPath}" "${cache}/TobyAccessibilityMod_Version${tobyVersion}.zip" sudo unzip -n -d "${doomPath}" "${cache}/TobyAccessibilityMod_Version${tobyVersion}.zip"
sudo unzip -d "${doomPath}" "${cache}/OperationMDK.zip" sudo unzip -n -d "${doomPath}" "${cache}/OperationMDK.zip"
sudo cp -v "${cache}/keyshare-universal.pk3" "${doomPath}" sudo cp -v "${cache}/keyshare-universal.pk3" "${doomPath}"
sudo rm -fv "${doomPath}/"*.lnk sudo rm -fv "${doomPath}/"*.lnk
mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom" mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom"
@ -684,14 +684,9 @@ case "${game}" in
grep -qx "Path=${doomPath}" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/gzdoom.ini" || \ 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;^\[IWADSearch.Directories\]$;[IWADSearch.Directories]\nPath=${doomPath};" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/gzdoom.ini"
sed -i 's/Mouse1=+attack/CTRL=+attack/' "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/gzdoom.ini" sed -i 's/Mouse1=+attack/CTRL=+attack/' "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/gzdoom.ini"
# Unmodified Doom with accessibility. launcherPath="$(readlink -f "$0")"
add_launcher "$(command -v gzdoom) ${doomPath}/TobyAccMod_V${tobyVersion}.pk3" launcherPath="${launcherPath%/*}"
# Toby accessibility mods add_launcher "${launcherPath}/.scripts/FreeDoom.sh"
game="Freedoom Toby Mod"
add_launcher "$(command -v gzdoom) ${doomPath}/TobyAccMod_V${tobyVersion}.pk3" "${doomPath}/TobyDoomLevels.wad"
# OperationMDK
game="Freedoom OperationMDK"
add_launcher "$(command -v gzdoom) ${doomPath}/TobyAccMod_V${tobyVersion}.pk3" "${doomPath}/OpMDK.wad"
;; ;;
"Monkey Spank") "Monkey Spank")
check_dependencies python-pygame:pygame python-xdg:xdg python-pyperclip:pyperclip python-requests:requests python-setproctitle:setproctitle check_dependencies python-pygame:pygame python-xdg:xdg python-pyperclip:pyperclip python-requests:requests python-setproctitle:setproctitle