summaryrefslogtreecommitdiff
path: root/tools/sourceformatter
diff options
context:
space:
mode:
authoretobi <git@e-tobi.net>2009-11-03 22:04:11 +0100
committeretobi <git@e-tobi.net>2009-11-03 22:18:04 +0100
commitccbbe046f0efb2c9a63e78d307f2c1b96c1c3e64 (patch)
tree499523f44682328545429f93c98d4421cbdc1356 /tools/sourceformatter
parent5ae195f9b432f99a25b6dbaf155879ce9fd815c1 (diff)
downloadvdr-plugin-vodcatcher-master.tar.gz
vdr-plugin-vodcatcher-master.tar.bz2
added toolsHEADv0.2.2master
Diffstat (limited to 'tools/sourceformatter')
-rwxr-xr-xtools/sourceformatter17
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