bin/isabelle-interface
author wenzelm
Wed, 15 Mar 2006 16:18:12 +0100
changeset 19274 b85e16bd70d0
parent 15980 3dfcdb19f242
child 28502 6b0e3e4e1891
permissions -rwxr-xr-x
rename_frees: treat trivial names; monomorphic: tuned invented names;

#!/usr/bin/env bash
#
# $Id$
# Author: Markus Wenzel, TU Muenchen
#
# Isabelle interface startup script.

if [ -L "$0" ]; then
  TARGET="$(LC_ALL=C ls -l "$0" | sed 's/.* -> //')"
  exec "$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET")" "$@"
fi


## settings

PRG="$(basename "$0")"

ISABELLE_HOME="$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd ..; pwd)"
source "$ISABELLE_HOME/lib/scripts/getsettings" || exit 2


## diagnostics

function fail()
{
  echo "$1" >&2
  exit 2
}


## main

case "$ISABELLE_INTERFACE" in
  none)
    INTERFACE="$ISABELLE"
    ;;
  */*)
    INTERFACE="$ISABELLE_INTERFACE"
    ;;
esac

[ ! -x "$INTERFACE" ] && fail "Bad Isabelle interface: \"$ISABELLE_INTERFACE\""

exec "$INTERFACE" "$@"