aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGravatar Denis Vlasenko <vda.linux@googlemail.com>2008-07-12 23:02:43 +0000
committerGravatar Denis Vlasenko <vda.linux@googlemail.com>2008-07-12 23:02:43 +0000
commit52ec4b98d507f9df867fbe16e318ec0ef144ed72 (patch)
tree5712c1c6ea61ff0f9457b0ff14492b08a5ddcaa9 /scripts
parenta8374a19161f7a8d09309da730aa786ca773789f (diff)
downloadbusybox-52ec4b98d507f9df867fbe16e318ec0ef144ed72.tar.gz
busybox-52ec4b98d507f9df867fbe16e318ec0ef144ed72.tar.bz2
whitespace fixes
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 \
# 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