Admin/Linux/Isabelle.run
author wenzelm
Wed Nov 01 22:13:38 2017 +0100 (20 months ago)
changeset 66986 5188b1c59434
parent 63574 4ea48cbc54c1
child 67490 982f0bf34804
permissions -rw-r--r--
more timing;
     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 exec "$ISABELLE_HOME/contrib/jdk/${ISABELLE_PLATFORM64:-$ISABELLE_PLATFORM32}/jre/bin/java" \
    36   "-Disabelle.root=$ISABELLE_HOME" "${JAVA_OPTIONS[@]}" \
    37   -classpath "{CLASSPATH}" \
    38   "-splash:$ISABELLE_HOME/lib/logo/isabelle.gif" \
    39   isabelle.Main "$@"