Whamcloud - gitweb
LUDOC-266 protocol: Initial content for new repository
[doc/protocol.git] / build / whitespace.sh
1 #!/bin/bash
2 # whitespace.sh
3 # Remove whitespace at the end of lines. This could go directly in the
4 # Makefile if suitably quoted, but getting the quoting just right is
5 # both fussy and makes the action less readable.
6 # [2015-01-23]
7 # I needed to remove _all_ the space, not just the last instance.
8 # -Andrew
9
10 for file in $@
11 do
12     echo "$file: "
13     sed -i.bak -E "s/[[:space:]]*$//" $file
14     diff $file ${file}.bak
15 done
16