Fix make-array transforms.
[sbcl.git] / tools-for-build / whitespacely-canonical-filenames
index e3f839f..42935fe 100755 (executable)
@@ -22,9 +22,18 @@ else
     find_opt=""
 fi
 
-for source_extension in $source_extensions; do 
-    find . \( \
-            -path contrib/asdf \
+# SunOS find does not support -path.  Try to find a binary which does.
+if   [ -n "$GNUFIND" ];        then :
+elif which gfind >/dev/null;   then GNUFIND=gfind
+elif which gnufind >/dev/null; then GNUFIND=gnufind
+else                                GNUFIND=find; fi
+if ! "$GNUFIND" /dev/null -path dummy 2>/dev/null; then
+    echo "Warning: $GNUFIND might not be GNU: use of -path fails." 1>&2
+fi
+
+for source_extension in $source_extensions; do
+    "$GNUFIND" . \( \
+            -path contrib/asdf -o \
             -name _darcs -o \
             -name '{arch}' -o \
             -name CVS -o \