From c487a6e15ab86f846a99b25186dbfbd24d5c3f36 Mon Sep 17 00:00:00 2001 From: AAGaming Date: Wed, 11 Sep 2024 21:02:41 -0400 Subject: [PATCH] deprecate install scripts in repo (use decky-installer/cli instead, they're the same scripts but more up to date) --- dist/install_prerelease.sh | 71 ++------------------------------------ dist/install_release.sh | 69 ++---------------------------------- 2 files changed, 4 insertions(+), 136 deletions(-) diff --git a/dist/install_prerelease.sh b/dist/install_prerelease.sh index 9e5ce9cc..bad3546a 100644 --- a/dist/install_prerelease.sh +++ b/dist/install_prerelease.sh @@ -1,70 +1,3 @@ #!/bin/sh - -[ "$UID" -eq 0 ] || exec sudo "$0" "$@" - -echo "Installing Steam Deck Plugin Loader pre-release..." - -USER_DIR="$(getent passwd $SUDO_USER | cut -d: -f6)" -HOMEBREW_FOLDER="${USER_DIR}/homebrew" - -# Create folder structure -rm -rf "${HOMEBREW_FOLDER}/services" -sudo -u $SUDO_USER mkdir -p "${HOMEBREW_FOLDER}/services" -sudo -u $SUDO_USER mkdir -p "${HOMEBREW_FOLDER}/plugins" -touch "${USER_DIR}/.steam/steam/.cef-enable-remote-debugging" - -# Download latest release and install it -RELEASE=$(curl -s 'https://api.github.com/repos/SteamDeckHomebrew/decky-loader/releases' | jq -r "first(.[] | select(.prerelease == "true"))") -VERSION=$(jq -r '.tag_name' <<< ${RELEASE} ) -DOWNLOADURL=$(jq -r '.assets[].browser_download_url | select(endswith("PluginLoader"))' <<< ${RELEASE}) - -printf "Installing version %s...\n" "${VERSION}" -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 - -systemctl stop plugin_loader 2> /dev/null -systemctl disable plugin_loader 2> /dev/null - -curl -L https://raw.githubusercontent.com/SteamDeckHomebrew/decky-loader/main/dist/plugin_loader-prerelease.service --output ${HOMEBREW_FOLDER}/services/plugin_loader-prerelease.service - -cat > "${HOMEBREW_FOLDER}/services/plugin_loader-backup.service" <<- EOM -[Unit] -Description=SteamDeck Plugin Loader -After=network.target -[Service] -Type=simple -User=root -Restart=always -KillMode=process -TimeoutStopSec=45 -ExecStart=${HOMEBREW_FOLDER}/services/PluginLoader -WorkingDirectory=${HOMEBREW_FOLDER}/services -Environment=UNPRIVILEGED_PATH=${HOMEBREW_FOLDER} -Environment=PRIVILEGED_PATH=${HOMEBREW_FOLDER} -Environment=LOG_LEVEL=DEBUG -[Install] -WantedBy=multi-user.target -EOM - -if [[ -f "${HOMEBREW_FOLDER}/services/plugin_loader-prerelease.service" ]]; then - printf "Grabbed latest prerelease service.\n" - sed -i -e "s|\${HOMEBREW_FOLDER}|${HOMEBREW_FOLDER}|" "${HOMEBREW_FOLDER}/services/plugin_loader-prerelease.service" - cp -f "${HOMEBREW_FOLDER}/services/plugin_loader-prerelease.service" "/etc/systemd/system/plugin_loader.service" -else - printf "Could not curl latest prerelease systemd service, using built-in service as a backup!\n" - rm -f "/etc/systemd/system/plugin_loader.service" - cp "${HOMEBREW_FOLDER}/services/plugin_loader-backup.service" "/etc/systemd/system/plugin_loader.service" -fi - -mkdir -p ${HOMEBREW_FOLDER}/services/.systemd -cp ${HOMEBREW_FOLDER}/services/plugin_loader-prerelease.service ${HOMEBREW_FOLDER}/services/.systemd/plugin_loader-prerelease.service -cp ${HOMEBREW_FOLDER}/services/plugin_loader-backup.service ${HOMEBREW_FOLDER}/services/.systemd/plugin_loader-backup.service -rm ${HOMEBREW_FOLDER}/services/plugin_loader-backup.service ${HOMEBREW_FOLDER}/services/plugin_loader-prerelease.service - -systemctl daemon-reload -systemctl start plugin_loader -systemctl enable plugin_loader +echo This script is deprecated! Use https://github.com/SteamDeckHomebrew/decky-installer/raw/main/cli/install_prerelease.sh instead! +exit 1 \ No newline at end of file diff --git a/dist/install_release.sh b/dist/install_release.sh index 6b31a0c4..4f2c3b17 100644 --- a/dist/install_release.sh +++ b/dist/install_release.sh @@ -1,68 +1,3 @@ #!/bin/sh - -[ "$UID" -eq 0 ] || exec sudo "$0" "$@" - -echo "Installing Steam Deck Plugin Loader release..." - -USER_DIR="$(getent passwd $SUDO_USER | cut -d: -f6)" -HOMEBREW_FOLDER="${USER_DIR}/homebrew" - -# Create folder structure -rm -rf "${HOMEBREW_FOLDER}/services" -sudo -u $SUDO_USER mkdir -p "${HOMEBREW_FOLDER}/services" -sudo -u $SUDO_USER mkdir -p "${HOMEBREW_FOLDER}/plugins" -touch "${USER_DIR}/.steam/steam/.cef-enable-remote-debugging" - -# Download latest release and install it -RELEASE=$(curl -s 'https://api.github.com/repos/SteamDeckHomebrew/decky-loader/releases' | jq -r "first(.[] | select(.prerelease == "false"))") -VERSION=$(jq -r '.tag_name' <<< ${RELEASE} ) -DOWNLOADURL=$(jq -r '.assets[].browser_download_url | select(endswith("PluginLoader"))' <<< ${RELEASE}) - -printf "Installing version %s...\n" "${VERSION}" -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 - -systemctl stop plugin_loader 2> /dev/null -systemctl disable plugin_loader 2> /dev/null - -curl -L https://raw.githubusercontent.com/SteamDeckHomebrew/decky-loader/main/dist/plugin_loader-release.service --output ${HOMEBREW_FOLDER}/services/plugin_loader-release.service - -cat > "${HOMEBREW_FOLDER}/services/plugin_loader-backup.service" <<- EOM -[Unit] -Description=SteamDeck Plugin Loader -After=network.target -[Service] -Type=simple -User=root -Restart=always -ExecStart=${HOMEBREW_FOLDER}/services/PluginLoader -WorkingDirectory=${HOMEBREW_FOLDER}/services -Environment=UNPRIVILEGED_PATH=${HOMEBREW_FOLDER} -Environment=PRIVILEGED_PATH=${HOMEBREW_FOLDER} -Environment=LOG_LEVEL=INFO -[Install] -WantedBy=multi-user.target -EOM - -if [[ -f "${HOMEBREW_FOLDER}/services/plugin_loader-release.service" ]]; then - printf "Grabbed latest release service.\n" - sed -i -e "s|\${HOMEBREW_FOLDER}|${HOMEBREW_FOLDER}|" "${HOMEBREW_FOLDER}/services/plugin_loader-release.service" - cp -f "${HOMEBREW_FOLDER}/services/plugin_loader-release.service" "/etc/systemd/system/plugin_loader.service" -else - printf "Could not curl latest release systemd service, using built-in service as a backup!\n" - rm -f "/etc/systemd/system/plugin_loader.service" - cp "${HOMEBREW_FOLDER}/services/plugin_loader-backup.service" "/etc/systemd/system/plugin_loader.service" -fi - -mkdir -p ${HOMEBREW_FOLDER}/services/.systemd -cp ${HOMEBREW_FOLDER}/services/plugin_loader-release.service ${HOMEBREW_FOLDER}/services/.systemd/plugin_loader-release.service -cp ${HOMEBREW_FOLDER}/services/plugin_loader-backup.service ${HOMEBREW_FOLDER}/services/.systemd/plugin_loader-backup.service -rm ${HOMEBREW_FOLDER}/services/plugin_loader-backup.service ${HOMEBREW_FOLDER}/services/plugin_loader-release.service - -systemctl daemon-reload -systemctl start plugin_loader -systemctl enable plugin_loader +echo This script is deprecated! Use https://github.com/SteamDeckHomebrew/decky-installer/raw/main/cli/install_release.sh instead! +exit 1 \ No newline at end of file