[BusyBox] Trivial whitespace cleanup

Larry Doolittle ldoolitt at recycle.lbl.gov
Mon Apr 19 12:32:07 UTC 2004


Erik -

> Could you run this script on your source tree?
> On my copy, it finds 18 C source files (*.[ch]) with
> trailing whitespace, all useless.

Changing "*.[ch]" to "Config.in" finds another two
files and a bunch of lines that could use trimming.

      - Larry  [doesn't like entropy in source code]
 
---cut here---
#!/bin/sh

# Get rid of trailing spaces and tabs in Config.in files.
# Don't mess up the time stamps of files that don't need changing.
# Show progress by listing the files that are changed.

for f in `find . -name "Config.in"`; do
    if grep "[  ]$" $f >/dev/null; then
        echo $f
        sed -e 's/[     ]*$//' <$f >temp.$$
        mv temp.$$ $f
    fi
done
---cut here---



More information about the busybox mailing list