bin/isabelle
author Walther Neuper <wneuper@ist.tugraz.at>
Mon, 27 Aug 2018 15:57:45 +0200
changeset 59462 a3edc91cfe1f
parent 59451 71b442e82416
permissions -rwxr-xr-x
sabelle2017->18: for Test_Isac.thy minor changes
     1 #!/usr/bin/env bash
     2 #
     3 # Author: Markus Wenzel, TU Muenchen
     4 #
     5 # Isabelle tool wrapper.
     6 
     7 if [ -L "$0" ]; then
     8   TARGET="$(LC_ALL=C ls -l "$0" | sed 's/.* -> //')"
     9   exec "$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET")" "$@"
    10 fi
    11 
    12 
    13 ## settings
    14 
    15 PRG="$(basename "$0")"
    16 
    17 ISABELLE_HOME="$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd ..; pwd)"
    18 source "$ISABELLE_HOME/lib/scripts/getsettings" || exit 2
    19 
    20 
    21 ## external tool (shell script)
    22 
    23 if [ "$#" -ge 1 -a "$1" != "-?" ]
    24 then
    25   TOOL_NAME="$1"
    26 
    27   splitarray ":" "$ISABELLE_TOOLS"; TOOLS=("${SPLITARRAY[@]}")
    28   for DIR in "${TOOLS[@]}"
    29   do
    30     TOOL="$DIR/$TOOL_NAME"
    31     case "$TOOL" in
    32       *~ | *.orig) ;;
    33       *)
    34         if [ -f "$TOOL" -a -x "$TOOL" ]; then
    35           shift
    36           exec "$TOOL" "$@"
    37         fi
    38         ;;
    39     esac
    40   done
    41 fi
    42 
    43 
    44 ## internal tool or usage (Scala)
    45 
    46 isabelle_admin_build jars || exit $?
    47 
    48 eval "declare -a JAVA_ARGS=($ISABELLE_TOOL_JAVA_OPTIONS)"
    49 exec isabelle java "${JAVA_ARGS[@]}" isabelle.Isabelle_Tool "$@"