summaryrefslogtreecommitdiff
path: root/v4l/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'v4l/scripts')
-rw-r--r--v4l/scripts/strip-trailing-whitespaces.sh17
1 files changed, 16 insertions, 1 deletions
diff --git a/v4l/scripts/strip-trailing-whitespaces.sh b/v4l/scripts/strip-trailing-whitespaces.sh
index ea4f28752..ea3e4defa 100644
--- a/v4l/scripts/strip-trailing-whitespaces.sh
+++ b/v4l/scripts/strip-trailing-whitespaces.sh
@@ -10,7 +10,22 @@ 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]+$//; print' < "${file}" > "${tmpfile}"
+ 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;
+ print' < "${file}" > "${tmpfile}"
diff -u "${file}" "${tmpfile}" | sed \
-e "s|^--- ${file}|--- ${file}.orig|" \
-e "s|^+++ ${tmpfile}|+++ ${file}|"