[MLton-commit] r4146

Stephen Weeks MLton@mlton.org
Thu, 3 Nov 2005 21:15:35 -0800


For some stupid reason 'ls' on Darwin returns zero exit status when
there are no files matching a pattern, unlike every other system, so I
switched to a different method.


----------------------------------------------------------------------

U   mlton/trunk/bin/regression

----------------------------------------------------------------------

Modified: mlton/trunk/bin/regression
===================================================================
--- mlton/trunk/bin/regression	2005-11-04 03:52:55 UTC (rev 4145)
+++ mlton/trunk/bin/regression	2005-11-04 05:15:34 UTC (rev 4146)
@@ -161,7 +161,7 @@
                         # latter will include other files, e.g. for finalize,
                         # it will also include finalize.2.
                         files="$f.[0-9].[cS]"
-                        if ls $f.[0-9][0-9].[cS] >/dev/null 2>&1; then 
+                        if [ 0 -ne `ls $f.[0-9][0-9].[cS] 2>/dev/null | wc -l` ]; then 
                                 files="$files $f.[0-9][0-9].[cS]"
                         fi
                         gcc -o $f -w -O1                                \