Admin/Linux/Isabelle.run
author wenzelm
Sat May 14 19:49:10 2016 +0200 (2016-05-14 ago)
changeset 63094 056ea294c256
parent 62036 773cb226738c
child 63574 4ea48cbc54c1
permissions -rw-r--r--
toplevel theorem statements support 'if'/'for' eigen-context;
wenzelm@53483
     1
#!/usr/bin/env bash
wenzelm@53483
     2
#
wenzelm@53483
     3
# Author: Makarius
wenzelm@53483
     4
#
wenzelm@54313
     5
# Main Isabelle application script.
wenzelm@53483
     6
wenzelm@53573
     7
# dereference executable
wenzelm@53483
     8
if [ -L "$0" ]; then
wenzelm@53483
     9
  TARGET="$(LC_ALL=C ls -l "$0" | sed 's/.* -> //')"
wenzelm@53483
    10
  exec "$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET")" "$@"
wenzelm@53483
    11
fi
wenzelm@53483
    12
wenzelm@53483
    13
wenzelm@53573
    14
# minimal Isabelle environment
wenzelm@53483
    15
wenzelm@53483
    16
ISABELLE_HOME="$(cd "$(dirname "$0")"; cd "$(pwd -P)"; pwd)"
wenzelm@53573
    17
source "$ISABELLE_HOME/lib/scripts/isabelle-platform"
wenzelm@53483
    18
wenzelm@53483
    19
wenzelm@61134
    20
# Java runtime options
wenzelm@61134
    21
wenzelm@61134
    22
ISABELLE_NAME="$(basename "$0" .run)"
wenzelm@61134
    23
if [ -z "$ISABELLE_PLATFORM64" ]; then
wenzelm@61134
    24
  declare -a JAVA_OPTIONS=($(perl -p -e 's,#.*$,,g;' "$ISABELLE_HOME/${ISABELLE_NAME}.options32"))
wenzelm@61134
    25
else
wenzelm@61134
    26
  declare -a JAVA_OPTIONS=($(perl -p -e 's,#.*$,,g;' "$ISABELLE_HOME/${ISABELLE_NAME}.options64"))
wenzelm@61134
    27
fi
wenzelm@61134
    28
wenzelm@61134
    29
wenzelm@53573
    30
# main
wenzelm@53483
    31
wenzelm@54037
    32
#paranoia setting -- avoid problems of Java/Swing versus XIM/IBus etc.
wenzelm@54037
    33
unset XMODIFIERS
wenzelm@54037
    34
wenzelm@61172
    35
if "$ISABELLE_HOME/bin/isabelle" jedit_client -c
wenzelm@61172
    36
then
wenzelm@61172
    37
  "$ISABELLE_HOME/bin/isabelle" jedit_client "$@"
wenzelm@61172
    38
else
wenzelm@61172
    39
  exec "$ISABELLE_HOME/contrib/jdk/${ISABELLE_PLATFORM64:-$ISABELLE_PLATFORM32}/jre/bin/java" \
wenzelm@61298
    40
    "-Disabelle.root=$ISABELLE_HOME" "${JAVA_OPTIONS[@]}" \
wenzelm@61172
    41
    -classpath "{CLASSPATH}" \
wenzelm@61172
    42
    "-splash:$ISABELLE_HOME/lib/logo/isabelle.gif" \
wenzelm@62036
    43
    isabelle.Main "$@"
wenzelm@61172
    44
fi