[MLton-commit] r6477

Vesa Karvonen vesak at mlton.org
Sat Mar 15 01:44:02 PST 2008


Enhanced to resolve references to MLTON_LIB.

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

U   mltonlib/trunk/com/ssh/generic/unstable/Generate-combination.sh

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

Modified: mltonlib/trunk/com/ssh/generic/unstable/Generate-combination.sh
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/Generate-combination.sh	2008-03-14 13:48:56 UTC (rev 6476)
+++ mltonlib/trunk/com/ssh/generic/unstable/Generate-combination.sh	2008-03-15 09:44:01 UTC (rev 6477)
@@ -1,25 +1,23 @@
 #!/bin/sh
 
-# Copyright (C) 2007 SSH Communications Security, Helsinki, Finland
+# Copyright (C) 2007-2008 SSH Communications Security, Helsinki, Finland
 #
 # This code is released under the MLton license, a BSD-style license.
 # See the LICENSE file or http://mlton.org/License for details.
 
-source="$1"
-target="$2"
+source=$(realpath $1)
+target=$(realpath $2)
 
-echo "(* Copyright (C) 2007 SSH Communications Security, Helsinki, Finland
- *
- * This code is released under the MLton license, a BSD-style license.
- * See the LICENSE file or http://mlton.org/License for details.
- *)
+MLTON_LIB="$(cd $(dirname $0)/../../../.. && pwd)"
 
-(* WARNING: This file was generated by running:
+echo "(* WARNING: This file was generated by running:
  *
- *> $(basename $0) $source $target
+ *> $(basename $0) $1 $2
  *)" > "$target"
 
-grep -e 'with/.*\.sml' "$source"     \
- | xargs cat                         \
- | grep -v -e '^[( ]\*'              \
+cd $(dirname $source)
+
+grep -e '.*/with/.*\.sml' "$source"         \
+ | sed -e 's#\$(MLTON_LIB)#'$MLTON_LIB'#g'  \
+ | xargs cat                                \
  >> "$target"




More information about the MLton-commit mailing list