[ooo-build-commit] .: bin/fix-trailing-space.sh
Lubos Lunak
llunak at kemper.freedesktop.org
Wed Oct 6 05:33:01 PDT 2010
bin/fix-trailing-space.sh | 12 ++++++++++++
1 file changed, 12 insertions(+)
New commits:
commit 579e6fecb495f9add74f3a0f19387e064dde8e0b
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Wed Oct 6 14:30:45 2010 +0200
a script to help with git complaining about trailing whitespace
diff --git a/bin/fix-trailing-space.sh b/bin/fix-trailing-space.sh
new file mode 100755
index 0000000..2ae222b
--- /dev/null
+++ b/bin/fix-trailing-space.sh
@@ -0,0 +1,12 @@
+#! /bin/bash
+
+# when git commit gives the following, feed this error output as input to this script
+# l10ntools/java/jpropex/java/JPropEx.java:28: trailing whitespace.
+# +
+# l10ntools/scripts/makefile.mk:4: trailing whitespace.
+# +#
+
+files=`cat - | grep ': trailing whitespace\.$' | sed 's/:[0-9]*: trailing whitespace.$//' | sort -u`
+for file in $files; do
+ sed -i 's/\s*$//' $file
+done
More information about the ooo-build-commit
mailing list