Files
yait/tools/Cleanup
2025-08-15 19:08:52 -04:00

21 lines
336 B
Bash

#!/bin/env bash
# Usage: ./Cleanup [FILE]...
make dist-clean
process_file() {
clang-format -i "$1"
tools/check_header_footer "$1"
}
if [[ $# -gt 0 ]]; then
for file in "$@"; do
process_file "$file"
done
else
for file in $(find yait core -type f \( -name "*.c" -o -name "*.h" \)); do
process_file "$file"
done
fi