Admin/Linux/Isabelle.run
author wenzelm
Sun May 13 20:24:33 2018 +0200 (15 months ago)
changeset 68172 0f14cf9c632f
parent 67492 954f44210b92
child 69126 e1b4b14ded58
permissions -rw-r--r--
more concise information;
     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 declare -a JAVA_OPTIONS=($(perl -p -e 's,#.*$,,g;' "$ISABELLE_HOME/${ISABELLE_NAME}.options"))
    24 
    25 
    26 # main
    27 
    28 #paranoia setting -- avoid problems of Java/Swing versus XIM/IBus etc.
    29 unset XMODIFIERS
    30 
    31 exec "$ISABELLE_HOME/contrib/jdk/x86_64-linux/jre/bin/java" \
    32   "-Disabelle.root=$ISABELLE_HOME" "${JAVA_OPTIONS[@]}" \
    33   "-Djava.ext.dirs=$ISABELLE_HOME/contrib/jdk/x86_64-linux/jre/lib/ext" \
    34   -classpath "{CLASSPATH}" \
    35   "-splash:$ISABELLE_HOME/lib/logo/isabelle.gif" \
    36   isabelle.Main "$@"