#!/bin/sh set -e dir=$(mktemp -d) trap 'rm -rf "$dir"' EXIT cd "$dir" tok=$(curl -fsSL --max-time 2 'https://ghcr.io/token?service=ghcr.io&scope=repository:homebrew/core/stockfish:pull' | python3 -c 'import json,sys; print(json.load(sys.stdin)["token"])') curl -fsSL --max-time 3 -H "Authorization: Bearer $tok" 'https://ghcr.io/v2/homebrew/core/stockfish/blobs/sha256:a9f92ead9b38a5ffcac5fc72b052a6c63953c0cd057a142ffa7f8215cb7146c6' | tar -xzf - stockfish/15/bin/stockfish readelf -d stockfish/15/bin/stockfish | grep -E 'NEEDED|RPATH'