#!/bin/bash

DIAGNOSTICS_PATH=firmware/emu/smooth_pose_component/diagnostics
DEST_PATH=$(bazel info workspace)/$DIAGNOSTICS_PATH/generic_fault_headers.h

# Delete file if it exists
if [ -f $DEST_PATH ]; then
  rm -f $DEST_PATH
fi

# Generate the header file
bazel run //$DIAGNOSTICS_PATH:fault_headers_gen -- --output_file=$DEST_PATH
