mirror of
https://github.com/dragoonDorise/EmuDeck.git
synced 2024-06-02 19:47:51 -04:00
Decky Install
This commit is contained in:
parent
1919bd1e6d
commit
1d9a3317ed
|
@ -5,19 +5,19 @@
|
|||
Plugins_install_cleanup() {
|
||||
local password=$1
|
||||
#We restart Decky
|
||||
systemctl daemon-reload
|
||||
systemctl restart plugin_loader
|
||||
#systemctl daemon-reload
|
||||
#systemctl restart plugin_loader
|
||||
|
||||
if [ $password = "Decky!" ] || [ $password = "gamer" ]; then
|
||||
echo $password | sudo -S -k passwd -d $(whoami)
|
||||
if [ "$password" = "Decky!" ] || [ "$password" = "gamer" ]; then
|
||||
echo "$password" | sudo -S -k passwd -d $(whoami)
|
||||
fi
|
||||
}
|
||||
|
||||
Plugins_checkPassword(){
|
||||
local password=$1
|
||||
if [ $password = "Decky!" ] || [ $password = "gamer" ]; then
|
||||
if [ "$password" = "Decky!" ] || [ "$password" = "gamer" ]; then
|
||||
#We create the password
|
||||
yes $password | passwd deck
|
||||
yes "$password" | passwd $(whoami)
|
||||
else
|
||||
if ( echo "$PASS" | sudo -S -k true ); then
|
||||
echo "true"
|
||||
|
@ -38,39 +38,54 @@ Plugins_checkPassword(){
|
|||
|
||||
Plugins_installPluginLoader(){
|
||||
local password=$1
|
||||
|
||||
local PluginLoader_releaseURL="https://github.com/SteamDeckHomebrew/decky-installer/releases/latest/download/install_release.sh"
|
||||
mkdir -p "$HOME/homebrew"
|
||||
Plugins_checkPassword $password && echo $password | sudo -S chown -R $USER:$USER "$HOME/homebrew"
|
||||
curl -L $PluginLoader_releaseURL | sh
|
||||
touch "$HOME/.steam/steam/.cef-enable-remote-debugging"
|
||||
echo $password | sudo -S chown $USER:$USER ~/.steam/steam/.cef-enable-remote-debugging
|
||||
Plugins_install_cleanup $password
|
||||
if [ ! -f $HOME/.steam/steam/.cef-enable-remote-debugging ]; then
|
||||
mkdir -p "$HOME/homebrew"
|
||||
Plugins_checkPassword $password && echo $password | sudo -S chown -R $USER:$USER "$HOME/homebrew"
|
||||
curl -L $PluginLoader_releaseURL | sh
|
||||
touch "$HOME/.steam/steam/.cef-enable-remote-debugging"
|
||||
echo $password | sudo -S chown $USER:$USER ~/.steam/steam/.cef-enable-remote-debugging
|
||||
Plugins_install_cleanup $password
|
||||
fi
|
||||
}
|
||||
|
||||
Plugins_installPowerTools(){
|
||||
local password=$1
|
||||
local ptHash
|
||||
Plugins_checkPassword $password
|
||||
ptHash=$(curl https://beta.deckbrew.xyz/plugins | jq -r '.[] | select(.name=="PowerTools").versions[0].hash')
|
||||
local url="https://cdn.tzatzikiweeb.moe/file/steam-deck-homebrew/versions/$ptHash.zip"
|
||||
echo $password | sudo -S rm -rf "$HOME/homebrew/plugins/PowerTools"
|
||||
curl -l "$url" --output "$HOME/homebrew/PowerTools.zip.temp" && mv "$HOME/homebrew/PowerTools.zip.temp" "$HOME/homebrew/PowerTools.zip"
|
||||
echo $password | sudo -S unzip "$HOME/homebrew/PowerTools.zip" -d "$HOME/homebrew/plugins/" && rm "$HOME/homebrew/PowerTools.zip"
|
||||
Plugins_install_cleanup $password
|
||||
|
||||
ptHash=$(curl https://beta.deckbrew.xyz/plugins | jq -r '.[] | select(.name=="PowerTools").versions[0].hash')
|
||||
if [ -d "$HOME/homebrew/plugins/" ]; then
|
||||
echo $password | sudo -S rm -rf "$HOME/homebrew/plugins/PowerTools"
|
||||
curl -l "$url" --output "$HOME/homebrew/PowerTools.zip.temp" && mv "$HOME/homebrew/PowerTools.zip.temp" "$HOME/homebrew/PowerTools.zip"
|
||||
echo $password | sudo -S unzip "$HOME/homebrew/PowerTools.zip" -d "$HOME/homebrew/plugins/" && rm "$HOME/homebrew/PowerTools.zip"
|
||||
Plugins_install_cleanup $password
|
||||
else
|
||||
rm -rf "$HOME/homebrew/plugins/PowerTools"
|
||||
curl -l "$url" --output "$HOME/homebrew/PowerTools.zip.temp" && mv "$HOME/homebrew/PowerTools.zip.temp" "$HOME/homebrew/PowerTools.zip"
|
||||
unzip "$HOME/homebrew/PowerTools.zip" -d "$HOME/homebrew/plugins/" && rm "$HOME/homebrew/PowerTools.zip"
|
||||
fi
|
||||
}
|
||||
|
||||
Plugins_installPowerControl(){
|
||||
local password=$1
|
||||
local destinationFolder="$HOME/homebrew/plugins/EmuDecky"
|
||||
local PowerControl_releaseURL="$(getLatestReleaseURLGH "mengmeet/PowerControl" ".tar.gz")"
|
||||
Plugins_checkPassword $password
|
||||
echo $password | sudo -S rm -rf $destinationFolder
|
||||
echo $password | sudo -S curl -L "$PowerControl_releaseURL" -o "$HOME/homebrew/plugins/PowerControl.tar.gz"
|
||||
echo $password | sudo -S unzip "$HOME/homebrew/plugins/PowerControl.tar.gz" -d "$HOME/homebrew/plugins/" && echo $password | sudo -S rm "$HOME/homebrew/plugins/PowerControl.tar.gz"
|
||||
echo $password | sudo -S chown $USER:$USER -R $HOME/homebrew/plugins/PowerControl
|
||||
chmod 555 -R $HOME/homebrew/plugins/PowerControl
|
||||
Plugins_install_cleanup $password
|
||||
if [ -d "$HOME/homebrew/plugins/" ]; then
|
||||
Plugins_checkPassword $password
|
||||
echo $password | sudo -S rm -rf $destinationFolder
|
||||
echo $password | sudo -S curl -L "$PowerControl_releaseURL" -o "$HOME/homebrew/plugins/PowerControl.tar.gz"
|
||||
echo $password | sudo -S unzip "$HOME/homebrew/plugins/PowerControl.tar.gz" -d "$HOME/homebrew/plugins/" && echo $password | sudo -S rm "$HOME/homebrew/plugins/PowerControl.tar.gz"
|
||||
echo $password | sudo -S chown $USER:$USER -R $HOME/homebrew/plugins/PowerControl
|
||||
chmod 555 -R $HOME/homebrew/plugins/PowerControl
|
||||
Plugins_install_cleanup $password
|
||||
else
|
||||
rm -rf $destinationFolder
|
||||
curl -L "$PowerControl_releaseURL" -o "$HOME/homebrew/plugins/PowerControl.tar.gz"
|
||||
unzip "$HOME/homebrew/plugins/PowerControl.tar.gz" -d "$HOME/homebrew/plugins/" && rm "$HOME/homebrew/plugins/PowerControl.tar.gz"
|
||||
chown $USER:$USER -R $HOME/homebrew/plugins/PowerControl
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
@ -82,13 +97,21 @@ Plugins_installEmuDecky(){
|
|||
local password=$1
|
||||
local destinationFolder="$HOME/homebrew/plugins/EmuDecky"
|
||||
local DeckyControls_releaseURL="$(getLatestReleaseURLGH "EmuDeck/EmuDecky" ".zip")"
|
||||
Plugins_checkPassword $password
|
||||
echo $password | sudo -S rm -rf $destinationFolder
|
||||
echo $password | sudo -S curl -L "$DeckyControls_releaseURL" -o "$HOME/homebrew/plugins/EmuDecky.zip"
|
||||
echo $password | sudo -S unzip "$HOME/homebrew/plugins/EmuDecky.zip" -d "$HOME/homebrew/plugins/" && echo $password | sudo -S rm "$HOME/homebrew/plugins/EmuDecky.zip"
|
||||
echo $password | sudo -S chown $USER:$USER -R $HOME/homebrew/plugins/EmuDecky
|
||||
chmod 555 -R $HOME/homebrew/plugins/EmuDecky
|
||||
Plugins_install_cleanup $password
|
||||
if [ -d "$HOME/homebrew/plugins/" ]; then
|
||||
Plugins_checkPassword $password
|
||||
echo $password | sudo -S rm -rf $destinationFolder
|
||||
echo $password | sudo -S curl -L "$DeckyControls_releaseURL" -o "$HOME/homebrew/plugins/EmuDecky.zip"
|
||||
echo $password | sudo -S unzip "$HOME/homebrew/plugins/EmuDecky.zip" -d "$HOME/homebrew/plugins/" && echo $password | sudo -S rm "$HOME/homebrew/plugins/EmuDecky.zip"
|
||||
echo $password | sudo -S chown $USER:$USER -R $HOME/homebrew/plugins/EmuDecky
|
||||
chmod 555 -R $HOME/homebrew/plugins/EmuDecky
|
||||
Plugins_install_cleanup $password
|
||||
else
|
||||
rm -rf $destinationFolder
|
||||
curl -L "$DeckyControls_releaseURL" -o "$HOME/homebrew/plugins/EmuDecky.zip"
|
||||
unzip "$HOME/homebrew/plugins/EmuDecky.zip" -d "$HOME/homebrew/plugins/" && rm "$HOME/homebrew/plugins/EmuDecky.zip"
|
||||
chown $USER:$USER -R $HOME/homebrew/plugins/EmuDecky
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
Plugins_installSteamDeckGyroDSU(){
|
||||
|
@ -99,3 +122,11 @@ Plugins_installSteamDeckGyroDSU(){
|
|||
curl -L $SDGyro_releaseURL --output /tmp/sdgyro.sh && chmod +x /tmp/sdgyro.sh && /tmp/sdgyro.sh && rm /tmp/sdgyro.sh
|
||||
Plugins_install_cleanup $password
|
||||
}
|
||||
|
||||
|
||||
|
||||
Plugins_install(){
|
||||
Plugins_installEmuDecky
|
||||
Plugins_installSteamDeckGyroDSU
|
||||
Plugins_installPluginLoader
|
||||
}
|
Loading…
Reference in a new issue