xref: /freebsd/contrib/libcbor/clang-format.sh (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
1#!/usr/bin/env bash
2
3# Usage: ./clang-format.sh <extra arguments>
4
5DIRS="src test examples"
6SOURCES=$(find ${DIRS} -name "*.c")
7SOURCES+=" $(find ${DIRS} -name "*.h")"
8SOURCES+=" $(find ${DIRS} -name "*.cpp")"
9
10clang-format $@ -style=file -i ${SOURCES}
11