[MLton-commit] r6146

Vesa Karvonen vesak at mlton.org
Thu Nov 8 12:57:49 PST 2007


Don't cat files that do not exist.
----------------------------------------------------------------------

U   mltonlib/trunk/org/mlton/vesak/use-lib/unstable/Make.sh

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

Modified: mltonlib/trunk/org/mlton/vesak/use-lib/unstable/Make.sh
===================================================================
--- mltonlib/trunk/org/mlton/vesak/use-lib/unstable/Make.sh	2007-11-08 19:36:17 UTC (rev 6145)
+++ mltonlib/trunk/org/mlton/vesak/use-lib/unstable/Make.sh	2007-11-08 20:57:48 UTC (rev 6146)
@@ -26,9 +26,12 @@
         -e "s/\\\${PRELUDE}/$(echo -n $4)/g"    \
   >> .tmp
 
-    if test "$(cat $1.use)" != "$(cat .tmp)" ; then
+    if test ! -f $1.use ; then
         mv .tmp $1.use
-        echo "Wrote $1.use"
+        echo "Created $1.use"
+    elif test "$(cat $1.use)" != "$(cat .tmp)" ; then
+        mv .tmp $1.use
+        echo "Updated $1.use"
     else
         rm .tmp
     fi




More information about the MLton-commit mailing list