blob: d34554d676bf908a81004bdc7c558f3bf9d5ca20 [file] [log] [blame]
Andrew Jefferyf5afcd72020-05-11 13:13:18 +09301#!/bin/bash
2
3: ${CLANG_FORMAT:=clang-format}
4
5FILES=$(comm -3 <(sort .clang-ignore) <(git ls-files | grep '.*\.[ch]$' | sort))
6
7if [ -n "$FILES" ]
8then
9 $CLANG_FORMAT -style=file -i $FILES
10fi