bin/isabelle-interface
author paulson
Tue, 10 Feb 2004 12:02:11 +0100
changeset 14378 69c4d5997669
parent 11550 915c5de6480f
child 14981 e73f8140af78
permissions -rwxr-xr-x
generic of_nat and of_int functions, and generalization of iszero and neg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11550
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
     1
#!/usr/bin/env bash
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
     2
#
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
     3
# $Id$
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
     4
# Author: Markus Wenzel, TU Muenchen
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
     5
# License: GPL (GNU GENERAL PUBLIC LICENSE)
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
     6
#
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
     7
# Isabelle interface startup script.
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
     8
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
     9
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    10
## settings
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    11
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    12
PRG="$(basename "$0")"
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    13
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    14
ISABELLE_HOME="$(dirname "$0")/.."
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    15
. "$ISABELLE_HOME/lib/scripts/getsettings" || \
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    16
  { echo "$PRG probably not called from its original place!"; exit 2; }
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    17
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    18
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    19
## diagnostics
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    20
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    21
function fail()
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    22
{
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    23
  echo "$1" >&2
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    24
  exit 2
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    25
}
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    26
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    27
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    28
## main
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    29
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    30
case "$ISABELLE_INTERFACE" in
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    31
  none)
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    32
    INTERFACE="$ISABELLE"
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    33
    ;;
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    34
  */*)
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    35
    INTERFACE="$ISABELLE_INTERFACE"
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    36
    ;;
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    37
  *)
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    38
    INTERFACE="$ISABELLE_HOME/lib/scripts/isa-$ISABELLE_INTERFACE"
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    39
    ;;
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    40
esac
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    41
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    42
[ ! -x "$INTERFACE" ] && fail "Bad Isabelle interface: \"$ISABELLE_INTERFACE\""
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    43
915c5de6480f smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff changeset
    44
exec "$INTERFACE" "$@"