diff options
Diffstat (limited to 'bin/cl')
-rwxr-xr-x | bin/cl | 26 |
1 files changed, 15 insertions, 11 deletions
@@ -187,6 +187,7 @@ for f in "$@"; do INTERACTIVE=false escape_name "$f" >> "$SCRIPT" done +set -- MAIN="$(mkstemp)" if [ "$NO_RC" = false ] && [ -e "$LISP_CLI_RC" ]; then @@ -217,7 +218,7 @@ if [ -z "$IMPL" ]; then fi done if [ -z "$IMPL" ]; then - printf 'Could not find any implementation in $PATH.\n' >&2 + printf "Could not find any implementation in \$PATH.\n" >&2 exit 2 fi fi @@ -228,6 +229,7 @@ if [ "$SKIP_DEFAULT_IMAGE" = false ] && [ -z "$IMAGE" ] && IMAGE="$DEFAULT_IMAGE" fi + case "$IMPL" in abcl) exit 4 @@ -242,19 +244,19 @@ case "$IMPL" in exit 4 ;; clisp) - ARGS="-ansi -i $MAIN" + set -- -ansi -i "$MAIN" if [ -n "$IMAGE" ]; then - set -- -M "$IMAGE" + set -- "$@" -M "$IMAGE" fi if [ "$NO_RC" = true ]; then - ARGS="$ARGS -norc" + set -- "$@" -norc fi if [ "$VERBOSE" = false ]; then - ARGS="$ARGS -q -q" + set -- "$@" -q -q else set -x fi - exec clisp $ARGS "$@" + exec clisp "$@" ;; cmucl) exit 4 @@ -269,19 +271,21 @@ case "$IMPL" in exit 4 ;; sbcl) - ARGS="--load $MAIN" + set -- --load "$MAIN" if [ -n "$IMAGE" ]; then - set -- --core "$IMAGE" + # The '--core' "C runtime option" must appear before the + # other "Lisp options", such as '--load'. + set -- --core "$IMAGE" "$@" fi if [ "$NO_RC" = true ]; then - ARGS="$ARGS --no-sysinit --no-userinit" + set -- "$@" --no-sysinit --no-userinit fi if [ "$VERBOSE" = false ]; then - ARGS="--noinform $ARGS" + set -- "$@" --noinform else set -x fi - exec sbcl "$@" $ARGS + exec sbcl "$@" ;; *) printf 'Unsupported implementation: "%s".\n\n' "$IMPL" >&2 |