bin/isabelle
author wenzelm
Tue May 17 09:58:40 2005 +0200 (2005-05-17)
changeset 15967 f9163c6f69d6
parent 15864 cc1b4a289321
child 28504 7ad7d7d6df47
permissions -rwxr-xr-x
proper treatment of directory links;
tuned;
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@15967
    10
  exec "$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET")" "$@"
wenzelm@15843
    11
fi
wenzelm@15843
    12
wenzelm@15967
    13
THIS=$(cd "$(dirname "$0")"; pwd -P)
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" "$@"