bin/isabelle-interface
author berghofe
Thu, 21 Apr 2005 18:56:03 +0200
changeset 15793 acfdd493f5c4
parent 15784 3a214de33d53
child 15843 d5bd4a18ce70
permissions -rwxr-xr-x
Made inst1_tac more robust against changes of variable indices.

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


## settings

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

THIS="$0"
while [ -L "$THIS" ]; do
    THIS="$(dirname "$THIS")/$(LC_ALL=C ls -l "$THIS" | sed 's/.* -> //')"
done
ISABELLE_HOME="$(cd "$(dirname "$THIS")/.."; pwd)"
. "$ISABELLE_HOME/lib/scripts/getsettings" || \
  { echo "$PRG probably not called from its original place!"; exit 2; }


## diagnostics

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


## main

case "$ISABELLE_INTERFACE" in
  none)
    INTERFACE="$ISABELLE"
    ;;
  */*)
    INTERFACE="$ISABELLE_INTERFACE"
    ;;
  *)
    INTERFACE="$ISABELLE_HOME/lib/scripts/isa-$ISABELLE_INTERFACE"
    ;;
esac

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

exec "$INTERFACE" "$@"