#!/bin/bash # Averto installer — downloads Averto, puts it in /Applications and opens it. # curl -fsSL https://averto-alpha.vercel.app/install.sh | bash # Files downloaded with curl aren't quarantined, so macOS won't show the # "can't verify the developer" prompt. Read this script before running it. set -euo pipefail URL="https://averto-alpha.vercel.app/download/Averto-mac.zip" DEST="${AVERTO_DEST:-/Applications}" APP="$DEST/Averto.app" TMP="$(mktemp -d -t averto)" trap 'rm -rf "$TMP"' EXIT if [ "$(uname)" != "Darwin" ]; then echo "Averto is a Mac app." >&2; exit 1; fi macos_major="$(sw_vers -productVersion | cut -d. -f1)" if [ "$macos_major" -lt 14 ]; then echo "Averto needs macOS 14 Sonoma or later." >&2; exit 1; fi echo "Downloading Averto…" curl -fsSL "$URL" -o "$TMP/Averto.zip" ditto -x -k "$TMP/Averto.zip" "$TMP" [ -d "$TMP/Averto.app" ] || { echo "Download looks broken. Try again." >&2; exit 1; } if pgrep -x Averto >/dev/null; then echo "Quitting the running copy…"; pkill -x Averto || true; sleep 1; fi if [ -d "$APP" ]; then # Keep the old version in the Trash rather than deleting it. mv "$APP" "$HOME/.Trash/Averto-old-$(date +%s).app" fi echo "Installing into $DEST…" ditto "$TMP/Averto.app" "$APP" xattr -dr com.apple.quarantine "$APP" 2>/dev/null || true open "$APP" echo "" echo "Averto is installed and running. Look for the eye in your menu bar." echo "Put your AirPods in and allow Motion & Fitness access when asked."