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;
     1 #!/usr/bin/env bash
     2 #
     3 # Author: Makarius
     4 #
     5 # Main Isabelle application script.
     6 
     7 # dereference executable
     8 if [ -L "$0" ]; then
     9   TARGET="$(LC_ALL=C ls -l "$0" | sed 's/.* -> //')"
    10   exec "$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET")" "$@"
    11 fi
    12 
    13 
    14 # minimal Isabelle environment
    15 
    16 ISABELLE_HOME="$(cd "$(dirname "$0")"; cd "$(pwd -P)"; pwd)"
    17 source "$ISABELLE_HOME/lib/scripts/isabelle-platform"
    18 
    19 
    20 # Java runtime options
    21 
    22 ISABELLE_NAME="$(basename "$0" .run)"
    23 if [ -z "$ISABELLE_PLATFORM64" ]; then
    24   declare -a JAVA_OPTIONS=($(perl -p -e 's,#.*$,,g;' "$ISABELLE_HOME/${ISABELLE_NAME}.options32"))
    25 else
    26   declare -a JAVA_OPTIONS=($(perl -p -e 's,#.*$,,g;' "$ISABELLE_HOME/${ISABELLE_NAME}.options64"))
    27 fi
    28 
    29 
    30 # main
    31 
    32 #paranoia setting -- avoid problems of Java/Swing versus XIM/IBus etc.
    33 unset XMODIFIERS
    34 
    35 if "$ISABELLE_HOME/bin/isabelle" jedit_client -c
    36 then
    37   "$ISABELLE_HOME/bin/isabelle" jedit_client "$@"
    38 else
    39   exec "$ISABELLE_HOME/contrib/jdk/${ISABELLE_PLATFORM64:-$ISABELLE_PLATFORM32}/jre/bin/java" \
    40     "-Disabelle.root=$ISABELLE_HOME" "${JAVA_OPTIONS[@]}" \
    41     -classpath "{CLASSPATH}" \
    42     "-splash:$ISABELLE_HOME/lib/logo/isabelle.gif" \
    43     isabelle.Main "$@"
    44 fi