#!/usr/bin/env bash # Writes the Homebrew formula for a release from its built archives. # Usage: install/homebrew.sh -.tar.gz> set -euo pipefail VERSION=$1 DIR=$2 BASE=${ONSET_DOWNLOADS:-https://downloads.coline.dev/onset} sha() { sha256sum "$DIR/onset-$VERSION-$1.tar.gz" | cut -d' ' -f1; } block() { # platform printf ' url "%s/%s/onset-%s-%s.tar.gz"\n sha256 "%s"\n' "$BASE" "$VERSION" "$VERSION" "$1" "$(sha "$1")" } cat <