3 CLOJURE_HOME
=`dirname $0`
4 CLOJURE_JAR
=$CLOJURE_HOME/clojure.jar
9 echo "Usage: `basename $0` [OPTIONS] [-- [ARGUMENTS]]"
10 echo "Runs FILENAME as a script if given, or starts a new interactive session."
12 echo "Possible OPTIONs are:"
13 echo " -s FILE Execute script instead of starting the Repl"
14 echo " -d PORT Remote debug mode, listens at PORT"
15 echo " -h, -? This help"
18 while getopts "h?s:d:" OPTION
; do
24 TARGET
="clojure.lang.Script $OPTARG"
27 DEBUG
="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=$OPTARG"
34 if [ ! "$TARGET" ]; then
35 TARGET
="clojure.lang.Repl"
38 exec $RLWRAP $JAVA $DEBUG -cp $CLOJURE_JAR:$CLASSPATH $TARGET $@