whitespace fixes

This commit is contained in:
Denis Vlasenko 2008-07-12 23:02:43 +00:00
parent a8374a1916
commit 52ec4b98d5
3 changed files with 18 additions and 8 deletions

View File

@ -27,13 +27,11 @@ find "$@" -type f \
# shell testsuite entries are not to be touched too
test "YES" = "${name/*.right/YES}" && continue
if test "YES" = "${name/*.[ch]/YES}" \
if test "YES" = "${name/*.[chsS]/YES}" \
-o "YES" = "${name/*.sh/YES}" \
-o "YES" = "${name/*.txt/YES}" \
-o "YES" = "${name/*.html/YES}" \
-o "YES" = "${name/*.htm/YES}" \
-o "YES" = "${name/*Makefile*/YES}" \
-o "YES" = "${name/*Kbuild*/YES}" \
-o "YES" = "${name/*Config.in*/YES}" \
; then
# More aggressive whitespace fixes for known file types
@ -46,6 +44,18 @@ find "$@" -type f \
-e "$tab17sptab_tabtab" -e "$tab17sptab_tabtab" \
-e "$tab17sptab_tabtab" -e "$tab17sptab_tabtab" \
| sed "$trailingws_"
elif test "YES" = "${name/*Makefile*/YES}" \
-o "YES" = "${name/*Kbuild*/YES}" \
; then
# For Makefiles, never convert "1-7spaces+tab" into "tabtab"
echo "Makefile: $name" >&2
cat "$name" \
| sed -e "$tab8sptab_tabtabtab" -e "$tab8sptab_tabtabtab" \
-e "$tab8sptab_tabtabtab" -e "$tab8sptab_tabtabtab" \
| sed -e "$tab17sptab_tabtab" -e "$tab17sptab_tabtab" \
-e "$tab17sptab_tabtab" -e "$tab17sptab_tabtab" \
-e "$tab17sptab_tabtab" -e "$tab17sptab_tabtab" \
| sed "$trailingws_"
else
# Only remove trailing WS for the rest
echo "Removing trailing whitespace: $name" >&2