summaryrefslogtreecommitdiff
path: root/dist/install_prerelease.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dist/install_prerelease.sh')
-rwxr-xr-xdist/install_prerelease.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/dist/install_prerelease.sh b/dist/install_prerelease.sh
index 276f3587..384383d2 100755
--- a/dist/install_prerelease.sh
+++ b/dist/install_prerelease.sh
@@ -12,10 +12,14 @@ sudo -u deck mkdir -p ${HOMEBREW_FOLDER}/services
sudo -u deck mkdir -p ${HOMEBREW_FOLDER}/plugins
# Download latest release and install it
-DOWNLOADURL="$(curl -s 'https://api.github.com/repos/SteamDeckHomebrew/decky-loader/releases' | jq -r "first(.[] | select(.prerelease == "true"))" | jq -r ".assets[].browser_download_url")"
+RELEASES="$(curl -s 'https://api.github.com/repos/SteamDeckHomebrew/decky-loader/releases')"
+RELEASE="$($RELEASES | jq -r "first(.[] | select(.prerelease == "true"))")"
+VERSION="$($RELEASE | jq -r ".tag_name")"
+DOWNLOADURL="$($RELEASE | jq -r ".assets[].browser_download_url")"
# printf "DOWNLOADURL=$DOWNLOADURL\n"
curl -L $DOWNLOADURL --output ${HOMEBREW_FOLDER}/services/PluginLoader
chmod +x ${HOMEBREW_FOLDER}/services/PluginLoader
+echo $VERSION > ${HOMEBREW_FOLDER}/services/.loader.version
systemctl --user stop plugin_loader 2> /dev/null
systemctl --user disable plugin_loader 2> /dev/null
@@ -30,9 +34,9 @@ Description=SteamDeck Plugin Loader
Type=simple
User=root
Restart=always
-ExecStart=/home/deck/homebrew/services/PluginLoader
-WorkingDirectory=/home/deck/homebrew/services
-Environment=PLUGIN_PATH=/home/deck/homebrew/plugins
+ExecStart=${HOMEBREW_FOLDER}/services/PluginLoader
+WorkingDirectory=${HOMEBREW_FOLDER}/services
+Environment=PLUGIN_PATH=${HOMEBREW_FOLDER}/plugins
Environment=LOG_LEVEL=DEBUG
[Install]
WantedBy=multi-user.target