10 lines · 712 B · ShellRaw
#!/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 <library dir> <out.jsonl> [<face models dir with SFace-pal8.mlmodelc>]set -euo pipefailhere="$(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"