bin/isabelle
author gagern
Wed, 20 Apr 2005 14:18:33 +0200
changeset 15778 98af3693f6b3
parent 14981 e73f8140af78
child 15784 3a214de33d53
permissions -rwxr-xr-x
Allow symlinks to shell scripts

#!/usr/bin/env bash
#
# $Id$
# Author: Markus Wenzel, TU Muenchen
#
# Smart selection of isabelle-process versus isabelle-interface.

THIS="$0"
while [ -L "$THIS" ]; do
    THIS="$(dirname "$THIS")/$(LC_ALL=C ls -l "$THIS" | sed 's/.* -> //')"
done
THIS="$(cd "$(dirname "$(readlink -f "$THIS")")"; pwd)"
NAME="$(basename "$0")"

case "$NAME" in
  I*)
    PRG=isabelle-interface
    ;;
  i*)
    PRG=isabelle-process
    ;;
esac

exec "$THIS/$PRG" "$@"