summaryrefslogtreecommitdiffstats
path: root/slib.sh
diff options
context:
space:
mode:
Diffstat (limited to 'slib.sh')
-rwxr-xr-xslib.sh21
1 files changed, 14 insertions, 7 deletions
diff --git a/slib.sh b/slib.sh
index 0186442..6948389 100755
--- a/slib.sh
+++ b/slib.sh
@@ -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 "$@";;