Fix a regression in class accessors.
[sbcl.git] / tools-for-build / canonicalize-whitespace-1
index 1e33369..431c1cb 100755 (executable)
@@ -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