#!/bin/bash set -euo pipefail dne='// This file is auto-generated by `gen/scripts/frames`. Do not edit.' preamble=resources/preamble target=target/frame cd "$(dirname "$0")/.." mkdir -p "$target/immutable" for x in mutable immutable/mod immutable/slippi immutable/peppi transpose; do echo "generating: src/frame/$x.rs" ( echo "$dne" echo cat "$preamble/$x.rs" echo clj -M -m "peppi-codegen.frame.${x//\//.}" ) | rustfmt > "$target/$x.rs" done rsync -a "$target/" ../src/frame