From 74e3432e087f6a27fcaa7751943dce14d7c5091a Mon Sep 17 00:00:00 2001 From: Joni Kokko Date: Tue, 2 Dec 2008 10:38:36 +0200 Subject: [PATCH] whitespace sript ignores .pc files --- script/strip-trailing-whitespace.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/script/strip-trailing-whitespace.sh b/script/strip-trailing-whitespace.sh index 81b9471f..bbe0b2c0 100755 --- a/script/strip-trailing-whitespace.sh +++ b/script/strip-trailing-whitespace.sh @@ -1,4 +1,5 @@ #!/bin/bash +cd `dirname "$0"` strip_whitespace() { @@ -12,9 +13,12 @@ strip_whitespace() } if [ "$1" = '--all' ]; then - find ../ -type f -regex '.*\.p*[ch]p*' \ + find ../ -type f -regex '.*\.[ch]' > tmp/tmp_file + find ../ -type f -regex '.*\.php' >> tmp/tmp_file + cat tmp/tmp_file \ | xargs -d '\n' egrep -l '[[:space:]]+$' \ | strip_whitespace + rm tmp/tmp_file elif [ -f "$1" ]; then echo "$1" | strip_whitespace else -- 2.11.4.GIT