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;
     1 #!/usr/bin/env bash
     2 #
     3 # $Id$
     4 # Author: Markus Wenzel, TU Muenchen
     5 #
     6 # Smart selection of isabelle-process versus isabelle-interface.
     7 
     8 if [ -L "$0" ]; then
     9   TARGET="$(LC_ALL=C ls -l "$0" | sed 's/.* -> //')"
    10   exec "$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET")" "$@"
    11 fi
    12 
    13 THIS=$(cd "$(dirname "$0")"; pwd -P)
    14 NAME="$(basename "$0")"
    15 
    16 case "$NAME" in
    17   I*)
    18     PRG=isabelle-interface
    19     ;;
    20   i*)
    21     PRG=isabelle-process
    22     ;;
    23 esac
    24 
    25 exec "$THIS/$PRG" "$@"