#!/usr/bin/env bash # # install-rift-repo.sh — Add The Rift APT repository to your system # # Usage: # curl -fsSL https://apt.rift.pw/install.sh | sudo bash # # or # wget -qO- https://apt.rift.pw/install.sh | sudo bash # set -euo pipefail echo "=== The Rift — APT Repository Setup ===" echo "" # Check root if [ "$(id -u)" -ne 0 ]; then echo "Error: This script must be run as root (or with sudo)" >&2 exit 1 fi # Check for Debian-based system if [ ! -f /etc/debian_version ]; then echo "Error: This script only supports Debian-based systems" >&2 exit 1 fi # Install prerequisites apt-get update -qq apt-get install -y -qq curl gnupg >/dev/null # Import GPG key echo "→ Importing Rift GPG signing key..." curl -fsSL https://apt.rift.pw/keys/rift-archive-keyring.gpg \ | gpg --dearmor -o /usr/share/keyrings/rift-archive-keyring.gpg chmod 644 /usr/share/keyrings/rift-archive-keyring.gpg # Add repository echo "→ Adding apt.rift.pw repository..." cat > /etc/apt/sources.list.d/rift.list << 'EOF' deb [signed-by=/usr/share/keyrings/rift-archive-keyring.gpg] https://apt.rift.pw/rift rift main EOF # Update echo "→ Updating package lists..." apt-get update -qq echo "" echo "=== Rift repository configured! ===" echo "" echo "Install the Rift node:" echo " sudo apt install rift-node" echo "" echo "Upgrade later with:" echo " sudo apt update && sudo apt upgrade rift-node" echo ""