#!/bin/bash

set -e

if [[ $MESON_SOURCE_ROOT ]]; then
  cd "$MESON_SOURCE_ROOT"
fi

git ls-files -z -- '*.cc' '*.hh' | xargs -0 clang-format -i
git ls-files -z -- '*.py' | xargs -0 ruff format
