Files
Wanjohi 84bd6b899a feat(install): the desktop app downloads from a link that never changes
/download/windows and /download/linux redirect to a one-minute signed URL
for the current desktop app, from the same private bucket as the host
agent, so a download page can link to them once and every download still
passes through the API. Which version they hand out is a constant bumped
by a commit after a release is published, as the host installer's is.

/desktop.sh installs it on Linux for the calling user: one binary in
~/.local/bin and a launcher entry, no root.
2026-10-11 14:13:44 +03:00

37 lines
1017 B
Bash

#!/bin/sh
# Installs the Nestri desktop app for the calling user: one binary in
# ~/.local/bin and a launcher entry. No root, nothing outside $HOME.
#
# curl -fsSL https://api.nestri.io/desktop.sh | sh
set -eu
API="${NESTRI_API:-https://api.nestri.io}"
BIN="${XDG_BIN_HOME:-$HOME/.local/bin}"
APPS="${XDG_DATA_HOME:-$HOME/.local/share}/applications"
case "$(uname -s)-$(uname -m)" in
Linux-x86_64) ;;
*) echo "Nestri runs on x86_64 Linux and Windows for now." >&2; exit 1 ;;
esac
mkdir -p "$BIN" "$APPS"
tmp="$BIN/.nestri.$$"
trap 'rm -f "$tmp"' EXIT
echo "Downloading Nestri..."
curl -fSL --progress-bar "$API/download/linux" -o "$tmp"
chmod 755 "$tmp"
mv "$tmp" "$BIN/nestri"
cat > "$APPS/nestri.desktop" <<DESKTOP
[Desktop Entry]
Type=Application
Name=Nestri
Comment=Play your games on our GPUs
Exec=$BIN/nestri
Terminal=false
Categories=Game;
DESKTOP
echo "Installed. Open Nestri from your app launcher, or run: $BIN/nestri"
case ":$PATH:" in *":$BIN:"*) ;; *) echo "($BIN is not on your PATH.)" ;; esac