bin/isabelle
author gagern
Wed Apr 20 14:18:33 2005 +0200 (2005-04-20)
changeset 15778 98af3693f6b3
parent 14981 e73f8140af78
child 15784 3a214de33d53
permissions -rwxr-xr-x
Allow symlinks to shell scripts
wenzelm@10555
     1
#!/usr/bin/env bash
wenzelm@2292
     2
#
wenzelm@2308
     3
# $Id$
wenzelm@9786
     4
# Author: Markus Wenzel, TU Muenchen
wenzelm@2308
     5
#
wenzelm@11550
     6
# Smart selection of isabelle-process versus isabelle-interface.
wenzelm@2292
     7
gagern@15778
     8
THIS="$0"
gagern@15778
     9
while [ -L "$THIS" ]; do
gagern@15778
    10
    THIS="$(dirname "$THIS")/$(LC_ALL=C ls -l "$THIS" | sed 's/.* -> //')"
gagern@15778
    11
done
gagern@15778
    12
THIS="$(cd "$(dirname "$(readlink -f "$THIS")")"; pwd)"
wenzelm@11550
    13
NAME="$(basename "$0")"
wenzelm@2292
    14
wenzelm@11566
    15
case "$NAME" in
wenzelm@11566
    16
  I*)
wenzelm@11566
    17
    PRG=isabelle-interface
wenzelm@11566
    18
    ;;
wenzelm@11566
    19
  i*)
wenzelm@11566
    20
    PRG=isabelle-process
wenzelm@11566
    21
    ;;
wenzelm@11566
    22
esac
wenzelm@9786
    23
wenzelm@11550
    24
exec "$THIS/$PRG" "$@"