diff options
Diffstat (limited to 'tools/sourceformatter')
-rwxr-xr-x | tools/sourceformatter | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/sourceformatter b/tools/sourceformatter new file mode 100755 index 0000000..58ad4aa --- /dev/null +++ b/tools/sourceformatter @@ -0,0 +1,17 @@ +#!/bin/sh + +make clean + +CCFILES=`find src/ -name *.cc` +HFILES=`find src/ -name *.h` + +SRCFILES="$CCFILES $HFILES" + +# +# Remove trailing whitespace from lines +# + +for file in $SRCFILES ; do + sed "s/[[:space:]]*$//" $file >$file.tmp + mv $file.tmp $file +done |