Files
VoiceAgent/swift/build.sh
T
2026-08-07 18:15:36 -04:00

27 lines
899 B
Bash
Executable File

#!/bin/bash
# Build the SpeechAnalyzer helper.
#
# On a managed Mac the freshly built binary is SIGKILLed (exit 137) until it has
# been through the binary approval process, and the approval takes a few minutes
# to sync. Rebuilding changes the binary, so it needs approving again.
set -euo pipefail
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$HERE"
swiftc -O -parse-as-library SpeechHelper.swift -o speech-helper
echo "built $HERE/speech-helper"
if ./speech-helper --check >/dev/null 2>&1; then
echo "it runs — ./speech-helper --check for details"
else
status=$?
if [ "$status" -eq 137 ]; then
echo "built, but killed on launch (137): request binary approval for"
echo " $HERE/speech-helper"
echo "then wait a few minutes for it to sync."
else
echo "built, but exited $status — run ./speech-helper --check to see why"
fi
fi