diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:38 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:38 -0800 |
commit | 64f037d91e0c9296dcaef9a0ff3eb33b19a2ed34 (patch) | |
tree | 1b23b8e8005328194e2fb4bf653806c85050933f /slib.sh | |
parent | 5bea21e81ed516440e34e480f2c33ca41aa8c597 (diff) | |
download | slib-64f037d91e0c9296dcaef9a0ff3eb33b19a2ed34.tar.gz slib-64f037d91e0c9296dcaef9a0ff3eb33b19a2ed34.zip |
Import Upstream version 3a5upstream/3a5
Diffstat (limited to 'slib.sh')
-rwxr-xr-x | slib.sh | 21 |
1 files changed, 14 insertions, 7 deletions
@@ -28,18 +28,17 @@ Usage: slib SCHEME Usage: slib - Initialize SLIB session using executable 'scheme', 'scm', - 'mzscheme', 'guile', 'gsi' or 'slib48'." + Initialize SLIB session using executable (MIT) 'scheme', 'scm', + 'gsi', 'mzscheme', 'guile', 'slib48', 'scmlit', 'elk', 'sisc', or + 'kawa'." case "$1" in -v | --ver*) echo slib "$VERSION"; exit 0;; - "") - if type scheme>/dev/null 2>&1; then - command=scheme + "") if type scheme>/dev/null 2>&1; then + command=scheme fi;; -*) echo "$usage"; exit 1;; - *) - command="$1" + *) command="$1" shift esac # If more arguments are supplied, then err out. @@ -62,6 +61,10 @@ if [ -z "$command" ]; then command=scmlit; implementation=scm elif type elk>/dev/null 2>&1; then command=elk; implementation=elk + elif type sisc>/dev/null 2>&1; then + command=sisc; implementation=ssc + elif type kawa>/dev/null 2>&1; then + command=kawa; implementation=kwa else echo No Scheme implementation found. exit 1 @@ -78,6 +81,8 @@ elif type $command>/dev/null 2>&1; then elif echo ${SPEW} | grep 'MzScheme' >/dev/null 2>&1; then implementation=plt elif echo ${SPEW} | grep 'Guile' >/dev/null 2>&1; then implementation=gui elif echo ${SPEW} | grep 'SCM' >/dev/null 2>&1; then implementation=scm + elif echo ${SPEW} | grep 'SISC' >/dev/null 2>&1; then implementation=ssc + elif echo ${SPEW} | grep 'Kawa' >/dev/null 2>&1; then implementation=kwa else implementation= fi else @@ -116,6 +121,8 @@ case $implementation in scm) exec $command -ip1 -l ${SCHEME_LIBRARY_PATH}scm.init "$@";; elk) exec $command -i -l ${SCHEME_LIBRARY_PATH}elk.init "$@";; gam) exec $command -:s ${SCHEME_LIBRARY_PATH}gambit.init - "$@";; + ssc) exec $command -e "(load \"${SCHEME_LIBRARY_PATH}sisc.init\")" -- "$@";; + kwa) exec $command -f ${SCHEME_LIBRARY_PATH}kawa.init -- "$@";; plt) exec $command -f ${SCHEME_LIBRARY_PATH}DrScheme.init "$@";; gui) exec $command -l ${SCHEME_LIBRARY_PATH}guile.init "$@";; mit) exec $command -load ${SCHEME_LIBRARY_PATH}mitscheme.init "$@";; |