| 
28251
 | 
     1  | 
#!/usr/bin/env bash
  | 
| 
 | 
     2  | 
#
  | 
| 
 | 
     3  | 
# Author: Makarius
  | 
| 
 | 
     4  | 
#
  | 
| 
 | 
     5  | 
# DESCRIPTION: Proof General / Emacs interface wrapper
  | 
| 
 | 
     6  | 
  | 
| 
 | 
     7  | 
  | 
| 
 | 
     8  | 
## diagnostics
  | 
| 
 | 
     9  | 
  | 
| 
 | 
    10  | 
function fail()
  | 
| 
 | 
    11  | 
{
 | 
| 
 | 
    12  | 
  echo "$1" >&2
  | 
| 
 | 
    13  | 
  exit 2
  | 
| 
 | 
    14  | 
}
  | 
| 
 | 
    15  | 
  | 
| 
 | 
    16  | 
  | 
| 
 | 
    17  | 
## main
  | 
| 
 | 
    18  | 
  | 
| 
28509
 | 
    19  | 
[ -z "$PROOFGENERAL_HOME" ] && fail "Missing Proof General installation (PROOFGENERAL_HOME)"
  | 
| 
 | 
    20  | 
  | 
| 
28251
 | 
    21  | 
INTERFACE="$PROOFGENERAL_HOME/isar/interface"
  | 
| 
 | 
    22  | 
[ ! -x "$INTERFACE" ] && fail "Bad interface script: \"$INTERFACE\""
  | 
| 
 | 
    23  | 
  | 
| 
34275
 | 
    24  | 
#legacy settings
  | 
| 
 | 
    25  | 
export ISABELLE="$ISABELLE_PROCESS"
  | 
| 
 | 
    26  | 
export ISATOOL="$ISABELLE_TOOL"
  | 
| 
 | 
    27  | 
  | 
| 
28251
 | 
    28  | 
exec "$INTERFACE" "$@"
  |