From 1d061479f27fb886921f9b2e011ca6c90875cee2 Mon Sep 17 00:00:00 2001 From: Tanner Kvarfordt Date: Tue, 30 Jan 2024 12:52:19 -0700 Subject: [PATCH] Fix EmuDecky installation (#977) --- functions/ToolScripts/emuDeckPlugins.sh | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/functions/ToolScripts/emuDeckPlugins.sh b/functions/ToolScripts/emuDeckPlugins.sh index 5adab0206..c7c69e994 100644 --- a/functions/ToolScripts/emuDeckPlugins.sh +++ b/functions/ToolScripts/emuDeckPlugins.sh @@ -20,14 +20,19 @@ Plugins_installPowerTools(){ } Plugins_installDeckyControls(){ - local destinationFolder="$HOME/homebrew/plugins/emudeck-decky-controls" - local DeckyControls_releaseURL="$(getLatestReleaseURLGH "EmuDeck/emudeck-decky-controls" ".zip")" + # The emudeck-decky-controls plugin is superseded by EmuDecky. + # Remove old emudeck-decky-controls installations to prevent + # duplicate plugins with different names. + sudo rm -rf "$HOME/homebrew/plugins/emudeck-decky-controls" + + local DeckyControls_releaseURL="$(getLatestReleaseURLGH "EmuDeck/EmuDecky" ".zip")" + local destinationArchive="$HOME/homebrew/plugins/EmuDecky.zip" + sudo curl -L "$DeckyControls_releaseURL" -o "$destinationArchive" + local destinationFolder="$HOME/homebrew/plugins/$(zipinfo -1 $destinationArchive | head -1)" sudo rm -rf $destinationFolder - #sudo mkdir -p $destinationFolder - sudo curl -L "$DeckyControls_releaseURL" -o "$HOME/homebrew/plugins/emudeck-decky-controls.zip" - sudo unzip "$HOME/homebrew/plugins/emudeck-decky-controls.zip" -d "$HOME/homebrew/plugins/" && sudo rm "$HOME/homebrew/plugins/emudeck-decky-controls.zip" - sudo chown $USER:$USER -R $HOME/homebrew/plugins/emudeck-decky-controls - chmod 555 -R $HOME/homebrew/plugins/emudeck-decky-controls + sudo unzip "$destinationArchive" -d "$HOME/homebrew/plugins/" && sudo rm "$destinationArchive" + sudo chown $USER:$USER -R "$destinationFolder" + chmod 555 "$destinationFolder" } Plugins_installSteamDeckGyroDSU(){