Admin/Linux/Isabelle.run
author wenzelm
Tue, 16 Jan 2018 09:58:17 +0100
changeset 67445 4311845b0412
parent 63574 4ea48cbc54c1
child 67490 982f0bf34804
permissions -rw-r--r--
tuned document;

#!/usr/bin/env bash
#
# Author: Makarius
#
# Main Isabelle application script.

# dereference executable
if [ -L "$0" ]; then
  TARGET="$(LC_ALL=C ls -l "$0" | sed 's/.* -> //')"
  exec "$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET")" "$@"
fi


# minimal Isabelle environment

ISABELLE_HOME="$(cd "$(dirname "$0")"; cd "$(pwd -P)"; pwd)"
source "$ISABELLE_HOME/lib/scripts/isabelle-platform"


# Java runtime options

ISABELLE_NAME="$(basename "$0" .run)"
if [ -z "$ISABELLE_PLATFORM64" ]; then
  declare -a JAVA_OPTIONS=($(perl -p -e 's,#.*$,,g;' "$ISABELLE_HOME/${ISABELLE_NAME}.options32"))
else
  declare -a JAVA_OPTIONS=($(perl -p -e 's,#.*$,,g;' "$ISABELLE_HOME/${ISABELLE_NAME}.options64"))
fi


# main

#paranoia setting -- avoid problems of Java/Swing versus XIM/IBus etc.
unset XMODIFIERS

exec "$ISABELLE_HOME/contrib/jdk/${ISABELLE_PLATFORM64:-$ISABELLE_PLATFORM32}/jre/bin/java" \
  "-Disabelle.root=$ISABELLE_HOME" "${JAVA_OPTIONS[@]}" \
  -classpath "{CLASSPATH}" \
  "-splash:$ISABELLE_HOME/lib/logo/isabelle.gif" \
  isabelle.Main "$@"