#!/bin/sh


# normalize $0 on certain BSDs
if [ "$(dirname "$0")" = "." ]; then
    SCRIPT="$(which $(basename "$0"))"
else
    SCRIPT="$0"
fi

# resolve symlinks to the script itself portably
while [ -h "$SCRIPT" ] ; do
    ls=`ls -ld "$SCRIPT"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '/.*' > /dev/null; then
        SCRIPT="$link"
    else
        SCRIPT="$(dirname "$SCRIPT"$)/$link"
    fi
done

BASEDIR=$(dirname $SCRIPT)

CP=$BASEDIR/../src/clj/:\
$BASEDIR/../classes/
for j in $BASEDIR/../lib/*.jar; do
  CP=$CP:$j
done
java -cp $CP reply.ReplyMain "$@"

# For jline debugging:
# java -Djline.internal.Log.debug=true -cp $CP reply.ReplyMain "$@"


#!/bin/sh


# normalize $0 on certain BSDs
if [ "$(dirname "$0")" = "." ]; then
    SCRIPT="$(which $(basename "$0"))"
else
    SCRIPT="$0"
fi

# resolve symlinks to the script itself portably
while [ -h "$SCRIPT" ] ; do
    ls=`ls -ld "$SCRIPT"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '/.*' > /dev/null; then
        SCRIPT="$link"
    else
        SCRIPT="$(dirname "$SCRIPT"$)/$link"
    fi
done

BASEDIR=$(dirname "$SCRIPT")

CP="$BASEDIR"/../src/clj/:\
"$BASEDIR"/../classes/
for j in "$BASEDIR"/../lib/*.jar; do
  CP=$CP:$j
done

java -cp "$CP" reply.ReplyMain "$@"

# For jline debugging:
# java -Djline.internal.Log.debug=true -cp $CP reply.ReplyMain "$@"


Handle spaces in path to script
Handle spaces in path to script
