bin/isabelle-interface
author wenzelm
Sat Sep 08 20:00:31 2001 +0200 (2001-09-08)
changeset 11550 915c5de6480f
child 14981 e73f8140af78
permissions -rwxr-xr-x
smart selection of isabelle-process versus isabelle-interface;
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
# License: GPL (GNU GENERAL PUBLIC LICENSE)
wenzelm@11550
     6
#
wenzelm@11550
     7
# Isabelle interface startup script.
wenzelm@11550
     8
wenzelm@11550
     9
wenzelm@11550
    10
## settings
wenzelm@11550
    11
wenzelm@11550
    12
PRG="$(basename "$0")"
wenzelm@11550
    13
wenzelm@11550
    14
ISABELLE_HOME="$(dirname "$0")/.."
wenzelm@11550
    15
. "$ISABELLE_HOME/lib/scripts/getsettings" || \
wenzelm@11550
    16
  { echo "$PRG probably not called from its original place!"; exit 2; }
wenzelm@11550
    17
wenzelm@11550
    18
wenzelm@11550
    19
## diagnostics
wenzelm@11550
    20
wenzelm@11550
    21
function fail()
wenzelm@11550
    22
{
wenzelm@11550
    23
  echo "$1" >&2
wenzelm@11550
    24
  exit 2
wenzelm@11550
    25
}
wenzelm@11550
    26
wenzelm@11550
    27
wenzelm@11550
    28
## main
wenzelm@11550
    29
wenzelm@11550
    30
case "$ISABELLE_INTERFACE" in
wenzelm@11550
    31
  none)
wenzelm@11550
    32
    INTERFACE="$ISABELLE"
wenzelm@11550
    33
    ;;
wenzelm@11550
    34
  */*)
wenzelm@11550
    35
    INTERFACE="$ISABELLE_INTERFACE"
wenzelm@11550
    36
    ;;
wenzelm@11550
    37
  *)
wenzelm@11550
    38
    INTERFACE="$ISABELLE_HOME/lib/scripts/isa-$ISABELLE_INTERFACE"
wenzelm@11550
    39
    ;;
wenzelm@11550
    40
esac
wenzelm@11550
    41
wenzelm@11550
    42
[ ! -x "$INTERFACE" ] && fail "Bad Isabelle interface: \"$ISABELLE_INTERFACE\""
wenzelm@11550
    43
wenzelm@11550
    44
exec "$INTERFACE" "$@"