I've excluded his reformatted NmraDcc.h NmraDcc.cpp because there were too many merge conflicts now, so I'll reapply his formatting rules in another commit
21 lines
365 B
Bash
Executable File
21 lines
365 B
Bash
Executable File
#!/bin/sh
|
|
|
|
FORMAT_SOURCES="NmraDcc.h NmraDcc.cpp"
|
|
|
|
error=0
|
|
|
|
for file in ${FORMAT_SOURCES}
|
|
do
|
|
output=$(mktemp -t stylecheckXXXXXXX)
|
|
astyle --options=.astylerc < $file > $output
|
|
if ! cmp -s $file $output
|
|
then
|
|
echo "Formatting on $file doesn't match expectations"
|
|
diff -u $file $output
|
|
error=1
|
|
fi
|
|
[ -f $output ] && rm $output
|
|
done
|
|
|
|
exit $error
|