diff --git a/lib/packages.sh b/lib/packages.sh index 820a15e..a33bfc4 100644 --- a/lib/packages.sh +++ b/lib/packages.sh @@ -10,6 +10,21 @@ install_sunshine() { # Ensure runtime deps useful for capture/diagnostics across vendors. yay_install pipewire-pulse vulkan-tools libva-utils jq + + # If a working sunshine (source build) is already installed, don't touch it. + # Otherwise re-running install.sh would replace the source build with + # sunshine-bin (the default $SUNSHINE_PKG), trip the ldd check, then rebuild + # from source — a redundant ~10 minute compile on every re-run. + if pkg_installed sunshine && sunshine_runtime_deps_ok; then + ok "sunshine (source build) already installed with all shared libs resolved" + return 0 + fi + # Same idempotency for sunshine-bin when it happens to be working. + if pkg_installed sunshine-bin && sunshine_runtime_deps_ok; then + ok "sunshine-bin already installed and runtime deps resolved" + return 0 + fi + yay_install "$SUNSHINE_PKG" # sunshine-bin is a precompiled AUR package; it breaks whenever Arch bumps a