#!/bin/bash # Installs Cue, the teleprompter, into your Applications folder and opens it. # # curl -fsSL https://YOUR-SITE/install.sh | bash # # What it does, in order: checks you're on macOS 14 or newer, downloads Cue.zip from # the same site, unpacks it, replaces any older Cue in Applications, and opens it. # Nothing else is installed, and nothing needs your password. set -euo pipefail SITE="${CUE_SITE:-https://cue-teleprompter-nine.vercel.app}" DEST="${CUE_DEST:-/Applications}" case "$SITE" in *REPLACE-WITH*) echo "This install script hasn't been set up with its website address yet." >&2; exit 1;; esac if [ "$(uname)" != "Darwin" ]; then echo "Cue is a Mac app, so it can't be installed here." >&2 exit 1 fi major="$(sw_vers -productVersion | cut -d. -f1)" if [ "$major" -lt 14 ]; then echo "Cue needs macOS 14 Sonoma or newer (this Mac has $(sw_vers -productVersion))." >&2 exit 1 fi # Standard accounts can't write to /Applications; use the personal one instead. if [ ! -w "$DEST" ]; then DEST="$HOME/Applications"; fi mkdir -p "$DEST" tmp="$(mktemp -d)" trap 'rm -rf "$tmp"' EXIT echo "Downloading Cue…" curl -fsSL "$SITE/Cue.zip" -o "$tmp/Cue.zip" ditto -x -k "$tmp/Cue.zip" "$tmp" if [ ! -d "$tmp/Cue.app" ]; then echo "The download didn't contain Cue.app. Please try again." >&2 exit 1 fi pkill -x Cue 2>/dev/null || true rm -rf "$DEST/Cue.app" ditto "$tmp/Cue.app" "$DEST/Cue.app" echo "Installed Cue in $DEST." if [ -z "${CUE_NO_OPEN:-}" ]; then open "$DEST/Cue.app"; fi