forked from git-up/GitUp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
format-source.sh
executable file
·23 lines (17 loc) · 1.04 KB
/
format-source.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh -ex
# brew install clang-format
CLANG_FORMAT_VERSION=`clang-format -version | awk '{ print $3 }'`
if [[ "$CLANG_FORMAT_VERSION" != "3.9.0" ]]; then
echo "Unsupported clang-format version"
exit 1
fi
find "GitUpKit/Components" -type f -iname *.h -o -iname *.m | xargs clang-format -style=file -i
find "GitUpKit/Core" -type f -iname *.h -o -iname *.m | xargs clang-format -style=file -i
find "GitUpKit/Extensions" -type f -iname *.h -o -iname *.m | xargs clang-format -style=file -i
find "GitUpKit/Interface" -type f -iname *.h -o -iname *.m | xargs clang-format -style=file -i
find "GitUpKit/Utilities" -type f -iname *.h -o -iname *.m | xargs clang-format -style=file -i
find "GitUpKit/Views" -type f -iname *.h -o -iname *.m | xargs clang-format -style=file -i
find "GitUp/Application" -type f -iname *.h -o -iname *.m | xargs clang-format -style=file -i
find "GitUp/Tool" -type f -iname *.h -o -iname *.m | xargs clang-format -style=file -i
find "Examples" -type f -iname *.h -o -iname *.m | xargs clang-format -style=file -i
echo "Done!"