Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /config/trunk/_run-sml
ViewVC logotype

Diff of /config/trunk/_run-sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1368, Sat Sep 13 04:44:43 2003 UTC revision 1725, Tue Dec 14 23:23:41 2004 UTC
# Line 3  Line 3 
3  # The standard driver for SML/NJ under the new runtime system  # The standard driver for SML/NJ under the new runtime system
4  #  #
5    
6  CMD=`basename $0`  CMD=`basename "$0"`
7    
8  #  #
9  # for /bin/ksh, disable reading user's environment file  # for /bin/ksh, disable reading user's environment file
# Line 21  Line 21 
21  #  #
22    
23  # the path of the directory in which executables (like this file) are kept.  # the path of the directory in which executables (like this file) are kept.
24  if [ x${SMLNJ_HOME} = x ] ; then  if [ x"$SMLNJ_HOME" = x ] ; then
25      BIN_DIR=@BINDIR@      BIN_DIR="@BINDIR@"
26      if [ ! -d "$BIN_DIR" ]; then      if [ ! -d "$BIN_DIR" ]; then
27          cmddir=`dirname $0`          cmddir=`dirname "$0"`
28          case "$cmddir" in          case "$cmddir" in
29              /* ) BIN_DIR="$cmddir";;              /* ) BIN_DIR="$cmddir";;
30              * ) BIN_DIR=`cd $cmddir; pwd` ;;              * ) BIN_DIR=`cd $cmddir; pwd` ;;
31          esac          esac
32      fi      fi
33  else  else
34      if [ x${CM_PATHCONFIG} = x ] ; then      if [ x"$CM_PATHCONFIG" = x ] ; then
35          CM_PATHCONFIG=${SMLNJ_HOME}/lib/pathconfig          CM_PATHCONFIG=${SMLNJ_HOME}/lib/pathconfig
36          export CM_PATHCONFIG          export CM_PATHCONFIG
37      fi      fi
# Line 47  Line 47 
47  #  #
48  # the following could be replaced with some site specific code  # the following could be replaced with some site specific code
49  #  #
50  ARCH_N_OPSYS=`$BIN_DIR/.arch-n-opsys`  ARCH_N_OPSYS=`"$BIN_DIR/.arch-n-opsys"`
51  if [ "$?" != "0" ]; then  if [ "$?" != "0" ]; then
52    echo "$CMD: unable to determine architecture/operating system"    echo "$CMD: unable to determine architecture/operating system"
53    exit 1    exit 1
# Line 61  Line 61 
61  #############################################################################  #############################################################################
62    
63  # special shortcut for frequent use (and for Linux' binfmt)  # special shortcut for frequent use (and for Linux' binfmt)
64  if [ `basename $0` = sml ] ; then  if [ `basename "$0"` = sml ] ; then
65      case "$1" in      case "$1" in
66          /* | ./* | ../* )          /* | ./* | ../* )
67              case "$1" in              case "$1" in
# Line 83  Line 83 
83  #  #
84  while [ "$#" != "0" ]; do  while [ "$#" != "0" ]; do
85    arg=$1    arg=$1
86    case $arg in    case "$arg" in
87      @SMLrun=*)      @SMLrun=*)
88        shift        shift
89        RUN=`echo $arg | sed 's/@SMLrun=//'`        RUN=`echo $arg | sed 's/@SMLrun=//'`
# Line 195  Line 195 
195  #  #
196  # run the sucker!  # run the sucker!
197  #  #
198  exec $RUN @SMLcmdname=$0 $HEAP $ALLOC "$@"  exec "$RUN" @SMLcmdname="$0" "$HEAP" $ALLOC "$@"

Legend:
Removed from v.1368  
changed lines
  Added in v.1725

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0