set -euxo pipefail
if ! command -v brew; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
brew --version
if ! command -v bitcoind; then
brew install bitcoin
fi
bitcoind --version
if [[ ! -f ~/Library/Application\ Support/Bitcoin/bitcoin.conf ]]; then
printf 'txindex=1\nsignet=1\n' > ~/Library/Application\ Support/Bitcoin/bitcoin.conf
fi
if ! bitcoin-cli getblockchaininfo; then
brew services start bitcoin
fi
bitcoin-cli getblockchaininfo | grep signet
if ! command -v ord; then
curl --proto '=https' --tlsv1.2 -fsLS https://ordinals.com/install.sh | bash -s
fi
ord --version