#!/bin/sh # Cross-compile the calendar file servers for 9front. # # One library, one binary per protocol. They install as ical/fs, # caldav/fs and so on -- named for the protocol they speak, because a # backend is a protocol and protocols span data types. # # Go 1.24.x is broken on plan9/amd64 (spinbit mutex panic before main), # so pin a known-good toolchain. set -e : ${GOTOOLCHAIN:=go1.27.0} : ${GOOS:=plan9} : ${GOARCH:=amd64} export GOTOOLCHAIN GOOS GOARCH cd "$(dirname "$0")" mkdir -p bin for c in cmd/*; do n=$(basename "$c") go build -o "bin/$n" "./$c" done ls -l bin