1#!/bin/sh
2
3format="clang-format -i -style=file"
4
5for dir in extension; do
6    c_files=`find $dir -maxdepth 1 -name '*.c'`
7    if [ "$c_files" != "" ]; then
8        $format $dir/*.c;
9    fi
10
11    h_files=`find $dir -maxdepth 1 -name '*.h'`
12    if [ "$h_files" != "" ]; then
13        $format $dir/*.h;
14    fi
15done
16