X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tools-for-build%2Fcanonicalize-whitespace-1;h=431c1cbbf7c3f7899f446513a907cb9d4b641514;hb=f44f6d1adbaaa7057f1948369299c0b2a08bcd6e;hp=1e3336946d7c85f08ea10a222964a8d532d23eaf;hpb=1af3faa2b79125b774c2182cab841ed7ee555bed;p=sbcl.git diff --git a/tools-for-build/canonicalize-whitespace-1 b/tools-for-build/canonicalize-whitespace-1 index 1e33369..431c1cb 100755 --- a/tools-for-build/canonicalize-whitespace-1 +++ b/tools-for-build/canonicalize-whitespace-1 @@ -12,17 +12,19 @@ echo '/$*'=$* echo '/$scratchfilename='$scratchfilename for f in $*; do + if egrep '( |[ ]+$)' $f >/dev/null + then + echo '/$f'=$f - echo '/$f'=$f + # We reuse the "expand" GNU utility to remove tabs, but if it turns out + # not to be available everywhere (or someone has defined "expand" to + # mean something else on some other class of system!) we could probably + # hand-code a replacement in a few lines. + expand $f > $scratchfilename - # We reuse the "expand" GNU utility to remove tabs, but if it turns out - # not to be available everywhere (or someone has defined "expand" to - # mean something else on some other class of system!) we could probably - # hand-code a replacement in a few lines. - expand $f > $scratchfilename - - sed 's/[ ]*$//' < $scratchfilename > $f + sed 's/[ ]*$//' < $scratchfilename > $f + fi done -rm $scratchfilename +rm -f $scratchfilename