Isabelle
author wenzelm
Thu, 28 Oct 2010 22:11:06 +0200
changeset 40236 8694a12611f9
parent 34282 549969a7f582
child 40571 fbac01813bff
permissions -rwxr-xr-x
handle Type.TYPE_MATCH, not arbitrary exceptions via MATCH_TYPE variable; clarified handle/raise wrt. Quotient_Info.NotFound -- avoid fragile unqualified NotFound depending on "open" scope; added helpful comments;

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

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


## settings

ISABELLE_HOME="$(cd "$(dirname "$0")"; pwd -P)"
source "$ISABELLE_HOME/lib/scripts/getsettings" || exit 2

unset ISABELLE_SETTINGS_PRESENT
unset ISABELLE_SITE_SETTINGS_PRESENT


## main

[ -e "$ISABELLE_HOME/Admin/build" ] && "$ISABELLE_HOME/Admin/build" jars

CLASSPATH="$(jvmpath "$CLASSPATH")"
exec "$ISABELLE_JAVA" \
  "-Disabelle.home=$(jvmpath "$ISABELLE_HOME")" \
  -jar "$(jvmpath "$ISABELLE_HOME/lib/classes/isabelle-scala.jar")" "$@"