#!/usr/bin/env bash set -euo pipefail export DEBIAN_FRONTEND=noninteractive arch="$(dpkg --print-architecture)" case "$arch" in arm64) cursor_url="https://api2.cursor.sh/updates/download/golden/linux-arm64-deb/cursor/2.4" ;; amd64) cursor_url="https://api2.cursor.sh/updates/download/golden/linux-x64-deb/cursor/2.4" ;; *) echo "Unsupported architecture for Cursor: $arch" >&2 exit 1 ;; esac curl -fsSL -L -o /tmp/cursor.deb "$cursor_url" apt-get update dpkg -i /tmp/cursor.deb || apt-get install -f -y rm -f /tmp/cursor.deb apt-get clean rm -rf /var/lib/apt/lists/*