#!/bin/ksh93 # # The standard "link" script for SML/NJ # # # for /bin/ksh, disable reading user's environment file # unset ENV ############################################################################# # # BEGIN SITE SPECIFIC STUFF # ############################################################################# # # SITE SPECIFIC CONFIGURATION INFO # # the path of the directory in which executables (like this file) are kept. if [[ -z ${SMLNJ_HOME} ]] ; then BIN_DIR="@CLIENT_BASEDIR@/lib/smlnj/bin" if [[ ! -d ${BIN_DIR} ]]; then BIN_DIR="${.sh.file%/*}" [[ ${BIN_DIR:0:1} == '/' ]] || \ { cd "${BIN_DIR}" ; cmddir="${PWD}" ; cd "${OLDPWD}" ; } fi else [[ -z ${CM_PATHCONFIG} ]] && \ export CM_PATHCONFIG="${SMLNJ_HOME}/lib/pathconfig" BIN_DIR="${SMLNJ_HOME}/bin" fi # the path of the directory in which the runtime system executables are kept. RUN_DIR="${BIN_DIR}/.run" # the path of the directory in which the heap images are kept. HEAP_DIR="${BIN_DIR}/.heap" # # the following could be replaced with some site specific code # . "${BIN_DIR}/.arch-n-opsys" ############################################################################# # # END SITE SPECIFIC STUFF # ############################################################################# # Process command line arguments RUN="${RUN_DIR}/run.${ARCH}-${OPSYS}" BOOT= HEAP='sml' while (( $# )); do arg="$1" case "$arg" in @SMLrun=*) RUN="${arg:8}" shift ;; @SMLboot=*) BOOT="${arg:9}" shift ;; @SMLheap=*) HEAP="${arg:9}" shift ;; @SMLversion) print "${CMD} 110.79" exit 0 ;; *) break ;; esac done if [[ ! -x ${RUN} ]]; then print -u2 "${CMD}: cannot find runtime system ${RUN}" exit 1 fi if [[ -z ${BOOT} ]]; then print -u2 '@SMLboot= must be specified.' exit 1 fi # run the sucker! exec "${RUN}" @SMLboot="${BOOT}" @SMLheap="${HEAP}" "$@"