#!/bin/bash set -euo pipefail dne='// This file is auto-generated by `gen/scripts/regen`. Do not edit.' preamble='use num_enum::TryFromPrimitive;' target=target/enums cd "$(dirname "$0")/.." mkdir -p "$target" for e in action_state attack character item stage; do ( echo -e "$dne\n$preamble\n" clj -M -m peppi-codegen.enums "$e" ) | rustfmt > "$target/$e.rs" done