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