Admin/Linux/Isabelle.run
author wenzelm
Fri Apr 25 23:47:39 2014 +0200 (2014-04-25)
changeset 56734 6ca87a061740
parent 56247 1ad01f98dc3e
child 58792 d6d9bb806bb5
permissions -rw-r--r--
suppress potential dangerous option (see 1baa5d19ac44);
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@53573
    20
# main
wenzelm@53483
    21
wenzelm@54037
    22
#paranoia setting -- avoid problems of Java/Swing versus XIM/IBus etc.
wenzelm@54037
    23
unset XMODIFIERS
wenzelm@54037
    24
wenzelm@53573
    25
exec "$ISABELLE_HOME/contrib/jdk/${ISABELLE_PLATFORM64:-$ISABELLE_PLATFORM32}/bin/java" \
wenzelm@53581
    26
  "-Disabelle.home=$ISABELLE_HOME" \
wenzelm@53581
    27
  {JAVA_ARGS} \
wenzelm@53581
    28
  -classpath "{CLASSPATH}" \
wenzelm@56247
    29
  "-splash:$ISABELLE_HOME/lib/logo/isabelle.gif" \
wenzelm@53573
    30
  isabelle.Main "$@"
wenzelm@53483
    31