#!/bin/zsh # ponytail: wrap the SPM binary in a minimal .app — WKWebView needs a bundle to behave. set -e cd "$(dirname "$0")" swift build 2>&1 | tail -1 APP=.build/ApexHTMLSpike.app rm -rf "$APP" && mkdir -p "$APP/Contents/MacOS" cp .build/debug/ApexHTMLSpike "$APP/Contents/MacOS/" cat > "$APP/Contents/Info.plist" <<'PLIST' CFBundleExecutableApexHTMLSpike CFBundleIdentifierde.babylondreams.museion.spike-apexhtml CFBundleNameSpike — apex HTML reading CFBundlePackageTypeAPPL LSMinimumSystemVersion26.0 NSHighResolutionCapable PLIST echo "built: $APP" exec "$APP/Contents/MacOS/ApexHTMLSpike" "${@:-../prose/kitchen-sink.md}"