bin/isabelle_scala_script
author wenzelm
Mon Mar 10 16:30:07 2014 +0100 (2014-03-10)
changeset 56029 8bedca4bd5a3
parent 52116 abf9fcfa65cf
permissions -rwxr-xr-x
clarified Args.src: more abstract type, position refers to name only;
prefer self-contained Args.check_src;
     1 #!/usr/bin/env bash
     2 #
     3 # Author: Makarius
     4 #
     5 # Isabelle/Scala script wrapper.
     6 
     7 if [ -L "$0" ]; then
     8   TARGET="$(LC_ALL=C ls -l "$0" | sed 's/.* -> //')"
     9   exec "$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET")" "$@"
    10 fi
    11 
    12 
    13 ## settings
    14 
    15 PRG="$(basename "$0")"
    16 
    17 ISABELLE_HOME="$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd ..; pwd)"
    18 source "$ISABELLE_HOME/lib/scripts/getsettings" || exit 2
    19 
    20 
    21 ## main
    22 
    23 exec "$ISABELLE_TOOL" scala -howtorun:script -nocompdaemon "$@"
    24