diff options
| author | Tranch <tranch.xiao@gmail.com> | 2026-02-04 23:39:48 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-04 23:39:48 +0800 |
| commit | 76aacf956764cfeded90916043abbca5fc220f0b (patch) | |
| tree | 5bafef22c2f107026ada92c751364a602d125227 /user_install_script.sh | |
| parent | ceb367fa1fdf05422e8d990903ec8426501b8a51 (diff) | |
| parent | e5dad45badbb2bb2f15b828140a35ae7cfc82f77 (diff) | |
| download | decky-installer-76aacf956764cfeded90916043abbca5fc220f0b.tar.gz decky-installer-76aacf956764cfeded90916043abbca5fc220f0b.zip | |
Merge pull request #2 from AeroCore-IO/copilot/add-custom-store-address-handling
Simplify checksum verification to use sha256sum directly
Diffstat (limited to 'user_install_script.sh')
| -rw-r--r-- | user_install_script.sh | 39 |
1 files changed, 31 insertions, 8 deletions
diff --git a/user_install_script.sh b/user_install_script.sh index c411321..609252e 100644 --- a/user_install_script.sh +++ b/user_install_script.sh @@ -34,13 +34,36 @@ if [ "$SKIP_DECKY_INSTALL" != true ]; then bash "${tmp_script}" fi -# Download and run decky plugin installer helper (mirror-hosted). -plugin_installer="/tmp/decky_plugin_installer.py" -if curl -fsSL "https://${DECKY_MIRROR_HOST}/AeroCore-IO/decky-installer/releases/latest/download/decky_plugin_installer.py" -o "${plugin_installer}"; then - python3 "${plugin_installer}" \ - --store-url "https://${DECKY_PLUGIN_MIRROR_HOST}/plugins" \ - --target-id "${DECKY_PLUGIN_TARGET_ID}" -else - echo "Failed to download decky installer helper script." >&2 +# Download and verify Decky Loader client (mirror-hosted). +decky_client="/tmp/decky_client.py" +decky_client_checksum="/tmp/decky_client.py.sha256" + +# Download the client script +if ! curl -fsSL "https://${DECKY_MIRROR_HOST}/AeroCore-IO/decky-installer/releases/latest/download/decky_client.py" -o "${decky_client}"; then + echo "Failed to download Decky Loader client script." >&2 + exit 1 +fi + +# Download the checksum file +if ! curl -fsSL "https://${DECKY_MIRROR_HOST}/AeroCore-IO/decky-installer/releases/latest/download/decky_client.py.sha256" -o "${decky_client_checksum}"; then + echo "Failed to download checksum file for Decky Loader client." >&2 exit 1 fi + +# Verify the checksum +if ! (cd /tmp && sha256sum -c decky_client.py.sha256); then + echo "Checksum verification failed for Decky Loader client. File may be compromised." >&2 + rm -f "${decky_client}" "${decky_client_checksum}" + exit 1 +fi + +# Install the plugin +python3 "${decky_client}" install \ + --store-url "https://${DECKY_PLUGIN_MIRROR_HOST}/plugins" \ + --target-id "${DECKY_PLUGIN_TARGET_ID}" + +# Configure the custom store URL for future use +python3 "${decky_client}" configure-store "https://${DECKY_PLUGIN_MIRROR_HOST}/plugins" + +# Clean up +rm -f "${decky_client}" "${decky_client_checksum}" |
