summaryrefslogtreecommitdiff
path: root/dist/s_whitespace
diff options
context:
space:
mode:
Diffstat (limited to 'dist/s_whitespace')
-rw-r--r--dist/s_whitespace28
1 files changed, 21 insertions, 7 deletions
diff --git a/dist/s_whitespace b/dist/s_whitespace
index 2e2c2863b4c..3a51b251bfe 100644
--- a/dist/s_whitespace
+++ b/dist/s_whitespace
@@ -4,13 +4,27 @@
t=__wt.$$
trap 'rm -f $t; exit 0' 0 1 2 3 13 15
-inc=`cd .. && echo dist/*.py dist/s_* src/include/*.[hi] src/include/*.in &&
- find test -name '*.[ch]' -print`
-
-for f in `sed -e '/^[a-z]/! d' filelist` $inc; do
- f="../$f"
+ws()
+{
sed -e 's/[ ][ ]*$//' \
-e '/^$/N' \
- -e '/\n$/D' < $f > $t
- cmp $t $f > /dev/null 2>&1 || (echo "$f" && cp $t $f)
+ -e '/\n$/D' < $1 > $t
+ cmp $t $1 > /dev/null 2>&1 || (echo "$1" && cp $t $1)
+}
+
+cd ..
+
+for f in `find dist -name '*.py' -name 's_*'`; do
+ ws $f
+done
+
+for f in `find examples ext src test \
+ -name '*.[chi]' -o \
+ -name '*.dox' -o \
+ -name '*.in' -o \
+ -name 'Makefile.am'`; do
+ if expr "$f" : ".*/Makefile.in" > /dev/null; then
+ continue
+ fi
+ ws $f
done