prime/tools/clang-format.sh
Luke Street 27d94af97b Add headers, clang-format, decompctx.py & more
Former-commit-id: 53f8d3cba7bd2d675cf6b99544af58bd24f98620
2022-04-09 20:17:13 -04:00

15 lines
254 B
Bash
Executable File

#!/bin/bash -e
function add_newline {
if [[ -z "$(tail -c 1 "$1")" ]]; then
:
else
echo >> "$1"
fi
}
FILES=$(git ls-files -o "*.h" "*.hpp" "*.c" "*.cpp")
clang-format -i ${FILES}
for f in ${FILES}; do
add_newline $f
done