Files
diachron/framework/platform
Michael Wolf 6a41273835 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>
2026-02-02 11:21:41 -05:00

27 lines
592 B
Plaintext

# 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