aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/fix_ws.sh16
1 files changed, 13 insertions, 3 deletions
diff --git a/scripts/fix_ws.sh b/scripts/fix_ws.sh
index 89fce959a..e7cf529a4 100755
--- a/scripts/fix_ws.sh
+++ b/scripts/fix_ws.sh
@@ -27,13 +27,11 @@ find "$@" -type f \
27 # shell testsuite entries are not to be touched too 27 # shell testsuite entries are not to be touched too
28 test "YES" = "${name/*.right/YES}" && continue 28 test "YES" = "${name/*.right/YES}" && continue
29 29
30 if test "YES" = "${name/*.[ch]/YES}" \ 30 if test "YES" = "${name/*.[chsS]/YES}" \
31 -o "YES" = "${name/*.sh/YES}" \ 31 -o "YES" = "${name/*.sh/YES}" \
32 -o "YES" = "${name/*.txt/YES}" \ 32 -o "YES" = "${name/*.txt/YES}" \
33 -o "YES" = "${name/*.html/YES}" \ 33 -o "YES" = "${name/*.html/YES}" \
34 -o "YES" = "${name/*.htm/YES}" \ 34 -o "YES" = "${name/*.htm/YES}" \
35 -o "YES" = "${name/*Makefile*/YES}" \
36 -o "YES" = "${name/*Kbuild*/YES}" \
37 -o "YES" = "${name/*Config.in*/YES}" \ 35 -o "YES" = "${name/*Config.in*/YES}" \
38 ; then 36 ; then
39 # More aggressive whitespace fixes for known file types 37 # More aggressive whitespace fixes for known file types
@@ -46,6 +44,18 @@ find "$@" -type f \
46 -e "$tab17sptab_tabtab" -e "$tab17sptab_tabtab" \ 44 -e "$tab17sptab_tabtab" -e "$tab17sptab_tabtab" \
47 -e "$tab17sptab_tabtab" -e "$tab17sptab_tabtab" \ 45 -e "$tab17sptab_tabtab" -e "$tab17sptab_tabtab" \
48 | sed "$trailingws_" 46 | sed "$trailingws_"
47 elif test "YES" = "${name/*Makefile*/YES}" \
48 -o "YES" = "${name/*Kbuild*/YES}" \
49 ; then
50 # For Makefiles, never convert "1-7spaces+tab" into "tabtab"
51 echo "Makefile: $name" >&2
52 cat "$name" \
53 | sed -e "$tab8sptab_tabtabtab" -e "$tab8sptab_tabtabtab" \
54 -e "$tab8sptab_tabtabtab" -e "$tab8sptab_tabtabtab" \
55 | sed -e "$tab17sptab_tabtab" -e "$tab17sptab_tabtab" \
56 -e "$tab17sptab_tabtab" -e "$tab17sptab_tabtab" \
57 -e "$tab17sptab_tabtab" -e "$tab17sptab_tabtab" \
58 | sed "$trailingws_"
49 else 59 else
50 # Only remove trailing WS for the rest 60 # Only remove trailing WS for the rest
51 echo "Removing trailing whitespace: $name" >&2 61 echo "Removing trailing whitespace: $name" >&2