bin/isabelle
author wenzelm
Tue Apr 26 19:49:39 2005 +0200 (2005-04-26)
changeset 15843 d5bd4a18ce70
parent 15784 3a214de33d53
child 15864 cc1b4a289321
permissions -rwxr-xr-x
improved handling of symlinks;
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
wenzelm@15843
     8
if [ -L "$0" ]; then
wenzelm@15843
     9
  TARGET="$(LC_ALL=C ls -l "$0" | sed 's/.* -> //')"
wenzelm@15843
    10
  exec $(cd "$(dirname "$0")"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET") "$@"
wenzelm@15843
    11
fi
wenzelm@15843
    12
wenzelm@15843
    13
THIS=$(cd "$(dirname "$0")"; pwd)
wenzelm@11550
    14
NAME="$(basename "$0")"
wenzelm@2292
    15
wenzelm@11566
    16
case "$NAME" in
wenzelm@11566
    17
  I*)
wenzelm@11566
    18
    PRG=isabelle-interface
wenzelm@11566
    19
    ;;
wenzelm@11566
    20
  i*)
wenzelm@11566
    21
    PRG=isabelle-process
wenzelm@11566
    22
    ;;
wenzelm@11566
    23
esac
wenzelm@9786
    24
wenzelm@11550
    25
exec "$THIS/$PRG" "$@"