diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-02-11 08:07:40 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-02-11 08:07:40 -0200 |
commit | 75aa5f959597ca484cc55d82d3d7c0f7f2d7d93d (patch) | |
tree | b971cf2291c307f48361a1c2466599f688fded6b /v4l/scripts/strip-trailing-whitespaces.sh | |
parent | 99b16f717573fb8dd0f8f7bb7a783bce25f673eb (diff) | |
parent | 4609ed0c664581008e1bc56a066abb9a8b835457 (diff) | |
download | mediapointer-dvb-s2-75aa5f959597ca484cc55d82d3d7c0f7f2d7d93d.tar.gz mediapointer-dvb-s2-75aa5f959597ca484cc55d82d3d7c0f7f2d7d93d.tar.bz2 |
Merging mkrufky tree
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l/scripts/strip-trailing-whitespaces.sh')
-rwxr-xr-x | v4l/scripts/strip-trailing-whitespaces.sh | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/v4l/scripts/strip-trailing-whitespaces.sh b/v4l/scripts/strip-trailing-whitespaces.sh index ea3e4defa..1a23e436d 100755 --- a/v4l/scripts/strip-trailing-whitespaces.sh +++ b/v4l/scripts/strip-trailing-whitespaces.sh @@ -10,21 +10,25 @@ for file in `find linux -type d | grep -v CVS | grep -v .cvsignore` ; do done for file in `find linux -type f | grep -v CVS | grep -v .cvsignore` ; do tmpfile="$WORK/${file}.$$" - perl -ne 's/[ \t]+$//; + perl -ne 's/[ \t]+$//; s/^\ \ \ \ \ \ \ \ /\t/; s/^\ \ \ \ \ \ \ \t/\t/; s/^\ \ \ \ \ \ \t/\t/; s/^\ \ \ \ \ \t/\t/; s/^\ \ \ \t/\t/; s/^\ \ \t/\t/; - s/^\ \t/\t/; - s/\t\ \ \ \ \ \ \ \ /\t\t/g; - s/\t\ \ \ \ \ \ \ \t/\t\t/g; - s/\t\ \ \ \ \ \ \t/\t\t/g; - s/\t\ \ \ \ \ \t/\t\t/g; - s/\t\ \ \ \t/\t\t/g; - s/\t\ \ \t/\t\t/g; - s/\t\ \t/\t\t/g; + s/^\ \t/\t/; + $m=1; + while ($m>0) { + $m=0; + $m= s/\t\ \ \ \ \ \ \ \ /\t\t/g; + $m=$m+s/\t\ \ \ \ \ \ \ \t/\t\t/g; + $m=$m+s/\t\ \ \ \ \ \ \t/\t\t/g; + $m=$m+s/\t\ \ \ \ \ \t/\t\t/g; + $m=$m+s/\t\ \ \ \t/\t\t/g; + $m=$m+s/\t\ \ \t/\t\t/g; + $m=$m+s/\t\ \t/\t\t/g; + } print' < "${file}" > "${tmpfile}" diff -u "${file}" "${tmpfile}" | sed \ -e "s|^--- ${file}|--- ${file}.orig|" \ |