bin/isabelle-interface
author kleing
Mon Jun 21 10:25:57 2004 +0200 (2004-06-21)
changeset 14981 e73f8140af78
parent 11550 915c5de6480f
child 15778 98af3693f6b3
permissions -rwxr-xr-x
Merged in license change from Isabelle2004
wenzelm@11550
     1
#!/usr/bin/env bash
wenzelm@11550
     2
#
wenzelm@11550
     3
# $Id$
wenzelm@11550
     4
# Author: Markus Wenzel, TU Muenchen
wenzelm@11550
     5
#
wenzelm@11550
     6
# Isabelle interface startup script.
wenzelm@11550
     7
wenzelm@11550
     8
wenzelm@11550
     9
## settings
wenzelm@11550
    10
wenzelm@11550
    11
PRG="$(basename "$0")"
wenzelm@11550
    12
wenzelm@11550
    13
ISABELLE_HOME="$(dirname "$0")/.."
wenzelm@11550
    14
. "$ISABELLE_HOME/lib/scripts/getsettings" || \
wenzelm@11550
    15
  { echo "$PRG probably not called from its original place!"; exit 2; }
wenzelm@11550
    16
wenzelm@11550
    17
wenzelm@11550
    18
## diagnostics
wenzelm@11550
    19
wenzelm@11550
    20
function fail()
wenzelm@11550
    21
{
wenzelm@11550
    22
  echo "$1" >&2
wenzelm@11550
    23
  exit 2
wenzelm@11550
    24
}
wenzelm@11550
    25
wenzelm@11550
    26
wenzelm@11550
    27
## main
wenzelm@11550
    28
wenzelm@11550
    29
case "$ISABELLE_INTERFACE" in
wenzelm@11550
    30
  none)
wenzelm@11550
    31
    INTERFACE="$ISABELLE"
wenzelm@11550
    32
    ;;
wenzelm@11550
    33
  */*)
wenzelm@11550
    34
    INTERFACE="$ISABELLE_INTERFACE"
wenzelm@11550
    35
    ;;
wenzelm@11550
    36
  *)
wenzelm@11550
    37
    INTERFACE="$ISABELLE_HOME/lib/scripts/isa-$ISABELLE_INTERFACE"
wenzelm@11550
    38
    ;;
wenzelm@11550
    39
esac
wenzelm@11550
    40
wenzelm@11550
    41
[ ! -x "$INTERFACE" ] && fail "Bad Isabelle interface: \"$ISABELLE_INTERFACE\""
wenzelm@11550
    42
wenzelm@11550
    43
exec "$INTERFACE" "$@"