From ab10720260e2c184b319026da89f4dfd338500bb Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Wed, 2 Apr 2008 19:20:20 -0400 Subject: Initial commit --- Lisp/startlisp | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100755 Lisp/startlisp (limited to 'Lisp/startlisp') diff --git a/Lisp/startlisp b/Lisp/startlisp new file mode 100755 index 0000000..a7005cf --- /dev/null +++ b/Lisp/startlisp @@ -0,0 +1,46 @@ +#!/bin/sh +# +# Args are Resources, Plugins, and Framework paths. +# + +topdir=`dirname $0` +cd "$1" + +template="init-template.lisp" +initfile="/tmp/moxie-init.$$.lisp" + +start_clisp() +{ + if [ ! -f "$1/base" ]; then + ln -s . "$1/base" + fi + "$topdir/clisp" -B "$1" -E UTF-8 -i "$initfile" +} + +start_openmcl() +{ + CCL_DEFAULT_DIRECTORY="$1" + export CCL_DEFAULT_DIRECTORY + "$topdir/openmcl" -l "$initfile" +} + +start_sbcl() +{ + "$topdir/sbcl" --core "$1/sbcl.core" --load "$initfile" +} + +# +# Create the init file by substituting our args for variables in +# the template. +# +sed -e "s,@resources@,$1,g;s,@plugins@,$2,g;s,@framework@,$3,g" < $template > $initfile + +# +# Start up a lisp with the initialization file we just created. +# +#start_clisp "$1" +start_sbcl "$1" +#start_openmcl "$1" + +# Remove the initfile when the lisp quits. +#rm -f $initfile \ No newline at end of file -- cgit v1.2.3