Admin/Linux/Isabelle
author wenzelm
Wed, 11 Sep 2013 21:40:03 +0200
changeset 53573 3cffcc303fc0
parent 53483 74a4685a96c8
child 53581 c0ad478abf50
permissions -rw-r--r--
cold-start of main application even on Linux;

#!/usr/bin/env bash
#
# Author: Makarius
#
# Main Isabelle application wrapper.

# dereference executable
if [ -L "$0" ]; then
  TARGET="$(LC_ALL=C ls -l "$0" | sed 's/.* -> //')"
  exec "$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET")" "$@"
fi


# minimal Isabelle environment

ISABELLE_HOME="$(cd "$(dirname "$0")"; cd "$(pwd -P)"; pwd)"
source "$ISABELLE_HOME/lib/scripts/isabelle-platform"


# main

declare -a JAVA_ARGS
JAVA_ARGS=({JAVA_ARGS})

exec "$ISABELLE_HOME/contrib/jdk/${ISABELLE_PLATFORM64:-$ISABELLE_PLATFORM32}/bin/java" \
  -classpath "$ISABELLE_HOME/lib/classes/ext/Pure.jar:$ISABELLE_HOME/lib/classes/ext/scala-compiler.jar:$ISABELLE_HOME/lib/classes/ext/scala-library.jar:$ISABELLE_HOME/lib/classes/ext/scala-swing.jar:$ISABELLE_HOME/lib/classes/ext/scala-actors.jar:$ISABELLE_HOME/lib/classes/ext/scala-reflect.jar:$ISABELLE_HOME/src/Tools/jEdit/dist/jedit.jar" \
  "${JAVA_ARGS[@]}" "-Disabelle.home=$ISABELLE_HOME" \
  isabelle.Main "$@"