bin/isabelle
author haftmann
Thu, 23 Nov 2017 17:03:27 +0000
changeset 67087 733017b19de9
parent 66906 03a96b8c7c06
permissions -rwxr-xr-x
generalized more lemmas
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10555
2323ec838401 /usr/bin/env bash;
wenzelm
parents: 10511
diff changeset
     1
#!/usr/bin/env bash
2292
c1c5652600f1 isabelle: Basic Isabelle startup script.
wenzelm
parents:
diff changeset
     2
#
9786
wenzelm
parents: 8359
diff changeset
     3
# Author: Markus Wenzel, TU Muenchen
2308
641be5ad47af improved 'not found' messages;
wenzelm
parents: 2292
diff changeset
     4
#
28504
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 15967
diff changeset
     5
# Isabelle tool wrapper.
2292
c1c5652600f1 isabelle: Basic Isabelle startup script.
wenzelm
parents:
diff changeset
     6
15843
d5bd4a18ce70 improved handling of symlinks;
wenzelm
parents: 15784
diff changeset
     7
if [ -L "$0" ]; then
d5bd4a18ce70 improved handling of symlinks;
wenzelm
parents: 15784
diff changeset
     8
  TARGET="$(LC_ALL=C ls -l "$0" | sed 's/.* -> //')"
15967
f9163c6f69d6 proper treatment of directory links;
wenzelm
parents: 15864
diff changeset
     9
  exec "$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET")" "$@"
15843
d5bd4a18ce70 improved handling of symlinks;
wenzelm
parents: 15784
diff changeset
    10
fi
d5bd4a18ce70 improved handling of symlinks;
wenzelm
parents: 15784
diff changeset
    11
28504
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 15967
diff changeset
    12
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 15967
diff changeset
    13
## settings
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 15967
diff changeset
    14
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 15967
diff changeset
    15
PRG="$(basename "$0")"
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 15967
diff changeset
    16
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 15967
diff changeset
    17
ISABELLE_HOME="$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd ..; pwd)"
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 15967
diff changeset
    18
source "$ISABELLE_HOME/lib/scripts/getsettings" || exit 2
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 15967
diff changeset
    19
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 15967
diff changeset
    20
62829
4141c2a8458b clarified Isabelle tool wrapper: bash, Scala, no perl, no ML;
wenzelm
parents: 48858
diff changeset
    21
## external tool (shell script)
4141c2a8458b clarified Isabelle tool wrapper: bash, Scala, no perl, no ML;
wenzelm
parents: 48858
diff changeset
    22
4141c2a8458b clarified Isabelle tool wrapper: bash, Scala, no perl, no ML;
wenzelm
parents: 48858
diff changeset
    23
if [ "$#" -ge 1 -a "$1" != "-?" ]
4141c2a8458b clarified Isabelle tool wrapper: bash, Scala, no perl, no ML;
wenzelm
parents: 48858
diff changeset
    24
then
4141c2a8458b clarified Isabelle tool wrapper: bash, Scala, no perl, no ML;
wenzelm
parents: 48858
diff changeset
    25
  TOOL_NAME="$1"
2292
c1c5652600f1 isabelle: Basic Isabelle startup script.
wenzelm
parents:
diff changeset
    26
62829
4141c2a8458b clarified Isabelle tool wrapper: bash, Scala, no perl, no ML;
wenzelm
parents: 48858
diff changeset
    27
  splitarray ":" "$ISABELLE_TOOLS"; TOOLS=("${SPLITARRAY[@]}")
4141c2a8458b clarified Isabelle tool wrapper: bash, Scala, no perl, no ML;
wenzelm
parents: 48858
diff changeset
    28
  for DIR in "${TOOLS[@]}"
4141c2a8458b clarified Isabelle tool wrapper: bash, Scala, no perl, no ML;
wenzelm
parents: 48858
diff changeset
    29
  do
4141c2a8458b clarified Isabelle tool wrapper: bash, Scala, no perl, no ML;
wenzelm
parents: 48858
diff changeset
    30
    TOOL="$DIR/$TOOL_NAME"
4141c2a8458b clarified Isabelle tool wrapper: bash, Scala, no perl, no ML;
wenzelm
parents: 48858
diff changeset
    31
    case "$TOOL" in
4141c2a8458b clarified Isabelle tool wrapper: bash, Scala, no perl, no ML;
wenzelm
parents: 48858
diff changeset
    32
      *~ | *.orig) ;;
4141c2a8458b clarified Isabelle tool wrapper: bash, Scala, no perl, no ML;
wenzelm
parents: 48858
diff changeset
    33
      *)
4141c2a8458b clarified Isabelle tool wrapper: bash, Scala, no perl, no ML;
wenzelm
parents: 48858
diff changeset
    34
        if [ -f "$TOOL" -a -x "$TOOL" ]; then
4141c2a8458b clarified Isabelle tool wrapper: bash, Scala, no perl, no ML;
wenzelm
parents: 48858
diff changeset
    35
          shift
4141c2a8458b clarified Isabelle tool wrapper: bash, Scala, no perl, no ML;
wenzelm
parents: 48858
diff changeset
    36
          exec "$TOOL" "$@"
4141c2a8458b clarified Isabelle tool wrapper: bash, Scala, no perl, no ML;
wenzelm
parents: 48858
diff changeset
    37
        fi
4141c2a8458b clarified Isabelle tool wrapper: bash, Scala, no perl, no ML;
wenzelm
parents: 48858
diff changeset
    38
        ;;
4141c2a8458b clarified Isabelle tool wrapper: bash, Scala, no perl, no ML;
wenzelm
parents: 48858
diff changeset
    39
    esac
4141c2a8458b clarified Isabelle tool wrapper: bash, Scala, no perl, no ML;
wenzelm
parents: 48858
diff changeset
    40
  done
4141c2a8458b clarified Isabelle tool wrapper: bash, Scala, no perl, no ML;
wenzelm
parents: 48858
diff changeset
    41
fi
28504
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 15967
diff changeset
    42
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 15967
diff changeset
    43
62829
4141c2a8458b clarified Isabelle tool wrapper: bash, Scala, no perl, no ML;
wenzelm
parents: 48858
diff changeset
    44
## internal tool or usage (Scala)
28504
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 15967
diff changeset
    45
62829
4141c2a8458b clarified Isabelle tool wrapper: bash, Scala, no perl, no ML;
wenzelm
parents: 48858
diff changeset
    46
isabelle_admin_build jars || exit $?
28504
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 15967
diff changeset
    47
66906
03a96b8c7c06 updated to jdk-8u152, which is for x86_64 only;
wenzelm
parents: 62840
diff changeset
    48
eval "declare -a JAVA_ARGS=($ISABELLE_TOOL_JAVA_OPTIONS)"
62829
4141c2a8458b clarified Isabelle tool wrapper: bash, Scala, no perl, no ML;
wenzelm
parents: 48858
diff changeset
    49
exec isabelle java "${JAVA_ARGS[@]}" isabelle.Isabelle_Tool "$@"