Add macOS x86_64 platform support

Platform detection now happens in framework/platform, sourced by both
sync.sh and the node shim. Uses shasum on macOS, sha256sum on Linux.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-02 11:21:41 -05:00
parent 60643409f6
commit eb12471941
6 changed files with 77 additions and 19 deletions

26
framework/platform Normal file
View File

@@ -0,0 +1,26 @@
# shellcheck shell=bash
# Detect platform (OS and architecture)
os=$(uname -s | tr '[:upper:]' '[:lower:]')
arch=$(uname -m)
case "$os" in
linux) platform_os=linux ;;
darwin) platform_os=darwin ;;
*) echo "Unsupported OS: $os" >&2; exit 1 ;;
esac
case "$arch" in
x86_64) platform_arch=x86_64 ;;
*) echo "Unsupported architecture: $arch" >&2; exit 1 ;;
esac
platform="${platform_os}_${platform_arch}"
# Platform-specific checksum command
if [ "$platform_os" = "darwin" ]; then
sha256_check() { shasum -a 256 -c -; }
else
sha256_check() { sha256sum -c -; }
fi