3 # OS X names clang-format as clang-format; Ubuntu uses
4 # clang-format-version so check for the right one
5 if command -v "clang-format-3.6" > /dev/null; then
6 export CF="$(command -v clang-format-3.6)"
7 elif command -v "clang-format" > /dev/null; then
8 export CF="$(command -v clang-format)"
10 echo "Unable to find clang-format"
17 for file in "${D}"*.cpp; do
18 if [ -e $file ] ; then
19 $CF -style=file -i "$file"
23 for file in "${D}"*.h ; do
24 if [ -e $file ] ; then
25 $CF -style=file -i "$file"
29 for file in "${D}"*.hpp ; do
30 if [ -e $file ] ; then
31 $CF -style=file -i "$file"
35 for file in "${D}"*.in ; do
36 if [ -e $file ] ; then
37 $CF -style=file -i "$file"