summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--user_install_script.sh32
1 files changed, 22 insertions, 10 deletions
diff --git a/user_install_script.sh b/user_install_script.sh
index d9c2773..42f8123 100644
--- a/user_install_script.sh
+++ b/user_install_script.sh
@@ -6,21 +6,33 @@ DECKY_MIRROR_HOST="__DECKY_MIRROR_HOST__"
DECKY_PLUGIN_MIRROR_HOST="__DECKY_PLUGIN_MIRROR_HOST__"
DECKY_PLUGIN_TARGET_ID="__DECKY_PLUGIN_ID__"
+# Check if Decky Loader is already installed and running on SteamOS
+echo "Checking if Decky Loader is already installed and running..."
+if systemctl is-active --quiet plugin_loader.service 2>/dev/null; then
+ echo "Decky Loader (plugin_loader.service) is already running. Skipping Decky Loader installation."
+ SKIP_DECKY_INSTALL=true
+else
+ echo "Decky Loader is not running or not installed. Proceeding with installation."
+ SKIP_DECKY_INSTALL=false
+fi
+
# Download the official installer script, rewrite domains to the mirror, then execute.
# This keeps the original installer logic intact while swapping network endpoints.
tmp_script="/tmp/decky_user_install_script.sh"
-if ! curl -fsSL "https://${DECKY_MIRROR_HOST}/SteamDeckHomebrew/decky-installer/releases/latest/download/user_install_script.sh" \
- | sed -E \
- -e "s#github\.com#${DECKY_MIRROR_HOST}#g" \
- -e "s#api\.github\.com#api.${DECKY_MIRROR_HOST}#g" \
- -e "s#raw\.githubusercontent\.com/([^/]+)/([^/]+)/([^/]+)/#${DECKY_MIRROR_HOST}/\1/\2/plain/#g" \
- > "${tmp_script}"; then
- echo "Failed to download or rewrite the official installer script." >&2
- exit 1
-fi
+if [ "$SKIP_DECKY_INSTALL" = false ]; then
+ if ! curl -fsSL "https://${DECKY_MIRROR_HOST}/SteamDeckHomebrew/decky-installer/releases/latest/download/user_install_script.sh" \
+ | sed -E \
+ -e "s#github\.com#${DECKY_MIRROR_HOST}#g" \
+ -e "s#api\.github\.com#api.${DECKY_MIRROR_HOST}#g" \
+ -e "s#raw\.githubusercontent\.com/([^/]+)/([^/]+)/([^/]+)/#${DECKY_MIRROR_HOST}/\1/\2/plain/#g" \
+ > "${tmp_script}"; then
+ echo "Failed to download or rewrite the official installer script." >&2
+ exit 1
+ fi
-bash "${tmp_script}"
+ bash "${tmp_script}"
+fi
# Download and run decky plugin installer helper (mirror-hosted).
plugin_installer="/tmp/decky_plugin_installer.py"