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