lib/Tools/console
author wenzelm
Thu, 10 Mar 2016 12:11:23 +0100
changeset 62587 e31bf8ed5397
parent 62562 905a5db3932d
child 62588 cd266473b81b
permissions -rwxr-xr-x
clarified messages, notably on Windows where CPU time of poly.exe is not measured;

#!/usr/bin/env bash
#
# Author: Makarius
#
# DESCRIPTION: run Isabelle process with raw ML console and line editor

isabelle_admin_build jars || exit $?

case "$ISABELLE_JAVA_PLATFORM" in
  x86-*)
    ISABELLE_BUILD_JAVA_OPTIONS="$ISABELLE_BUILD_JAVA_OPTIONS32"
    ;;
  x86_64-*)
    ISABELLE_BUILD_JAVA_OPTIONS="$ISABELLE_BUILD_JAVA_OPTIONS64"
    ;;
esac

declare -a JAVA_ARGS; eval "JAVA_ARGS=($ISABELLE_BUILD_JAVA_OPTIONS)"

mkdir -p "$ISABELLE_TMP_PREFIX" || exit $?

if type -p "$ISABELLE_LINE_EDITOR" > /dev/null
then
  exec "$ISABELLE_LINE_EDITOR" "$ISABELLE_TOOL" java "${JAVA_ARGS[@]}" isabelle.ML_Console "$@"
else
  echo "### No line editor: \"$ISABELLE_LINE_EDITOR\""
  exec "$ISABELLE_TOOL" java "${JAVA_ARGS[@]}" isabelle.ML_Console "$@"
fi