-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathformat_sources.sh
More file actions
23 lines (15 loc) · 829 Bytes
/
format_sources.sh
File metadata and controls
23 lines (15 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
echo "formatting files..."
ARGS=' --style=java --indent=spaces --pad-oper --pad-header --unpad-paren --add-brackets --add-one-line-brackets --keep-one-line-blocks --keep-one-line-blocks --keep-one-line-statements --align-pointer=type '
find . -name '*.cpp' -print -exec astyle $ARGS {} \;
find . -name '*.cc' -print -exec astyle $ARGS {} \;
find . -name '*.c' -print -exec astyle $ARGS {} \;
find . -name '*.hpp' -print -exec astyle $ARGS {} \;
find . -name '*.h' -print -exec astyle $ARGS {} \;
find . -name '*.cu' -print -exec astyle $ARGS {} \;
find . -name '*.java' -print -exec astyle $ARGS {} \;
find . -name '*.pde' -print -exec astyle $ARGS {} \;
find . -name '*.cl' -print -exec astyle $ARGS {} \;
echo "removing astyle crap..."
find . -name '*.orig' -exec rm '{}' \; -print
echo "done"