bin/isabelle_scala_script
author wenzelm
Thu, 22 Apr 2021 23:40:22 +0200
changeset 73858 37243ad3ecb6
parent 52116 abf9fcfa65cf
child 73962 ac07f6be27ea
permissions -rwxr-xr-x
fast approximation of test for process group (NB: initial process might already be terminated, while background processes are still running);

#!/usr/bin/env bash
#
# Author: Makarius
#
# Isabelle/Scala script wrapper.

if [ -L "$0" ]; then
  TARGET="$(LC_ALL=C ls -l "$0" | sed 's/.* -> //')"
  exec "$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET")" "$@"
fi


## settings

PRG="$(basename "$0")"

ISABELLE_HOME="$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd ..; pwd)"
source "$ISABELLE_HOME/lib/scripts/getsettings" || exit 2


## main

exec "$ISABELLE_TOOL" scala -howtorun:script -nocompdaemon "$@"