From ccbbe046f0efb2c9a63e78d307f2c1b96c1c3e64 Mon Sep 17 00:00:00 2001 From: etobi Date: Tue, 3 Nov 2009 22:04:11 +0100 Subject: added tools --- tools/sourceformatter | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 tools/sourceformatter (limited to 'tools/sourceformatter') 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 -- cgit v1.2.3