diff options
| author | Tranch <tranch.xiao@gmail.com> | 2026-02-04 11:49:33 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-04 11:49:33 +0800 |
| commit | ceb367fa1fdf05422e8d990903ec8426501b8a51 (patch) | |
| tree | 47d2146eb17b351e69125124d9ab085d7843638b | |
| parent | 8fb7778bb371b109cdecaddd7b4e212ef20feadd (diff) | |
| parent | 4a95462d78174d08f14438b32766c2847aaea77f (diff) | |
| download | decky-installer-ceb367fa1fdf05422e8d990903ec8426501b8a51.tar.gz decky-installer-ceb367fa1fdf05422e8d990903ec8426501b8a51.zip | |
Merge pull request #1 from AeroCore-IO/copilot/add-installation-script-flowv1.0.3
Add pre-installation check for Decky Loader on SteamOS
| -rw-r--r-- | user_install_script.sh | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/user_install_script.sh b/user_install_script.sh index d9c2773..c411321 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" != true ]; 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" |
