Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ cd "$(dirname "$0")"

PREFIX="${PREFIX:-$HOME/.local/bin}"

# maic needs FoundationModels, which only exists on macOS 26+. Fail early with a
# clear message rather than letting `swift build` emit an opaque SDK error.
os_ver="$(sw_vers -productVersion)"
[ "${os_ver%%.*}" -ge 26 ] 2>/dev/null || { echo "build: maic requires macOS 26 or later (detected $os_ver)." >&2; exit 1; }

echo "Building (release)…"
swift build -c release

Expand Down
6 changes: 6 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ esac
arch="$(uname -m)"
[ "$arch" = "arm64" ] || err "maic ships arm64-only (Apple silicon); detected '$arch'."

# maic needs FoundationModels, which only exists on macOS 26+. Without this the
# install succeeds but the binary can't launch (a cryptic dyld version error) —
# so fail here with a clear message instead.
os_ver="$(sw_vers -productVersion)"
[ "${os_ver%%.*}" -ge 26 ] 2>/dev/null || err "maic requires macOS 26 or later (detected $os_ver)."

for tool in curl tar shasum; do
command -v "$tool" >/dev/null 2>&1 || err "required tool not found: $tool"
done
Expand Down
Loading