#!/usr/bin/env bash # Builds and runs the phone's analysis layer on the Mac over a synthetic library (see albums-vision-mac/main.swift). # scripts/albums-vision-mac.sh [] set -euo pipefail here="$(cd "$(dirname "$0")" && pwd)" albums="$here/../apps/cotton/Sources/CottonUI/Albums" bin="${TMPDIR:-/tmp}/albums-vision-mac" xcrun swiftc -O -D ALBUMS_HARNESS -o "$bin" "$albums/AlbumsAnalysis.swift" "$albums/AlbumsFaces.swift" "$here/albums-vision-mac/main.swift" 2>&1 | grep -v warning || true [ -x "$bin" ] || { echo "build failed" >&2; exit 1; } ALBUMS_FACE_MODELS="${3:-$here/../apps/cotton/App/Flavours/albums/FaceModels}" "$bin" "$1" "$2"