bin/isabelle_scala_script
author haftmann
Fri, 14 Jun 2019 08:34:27 +0000
changeset 70335 9bd8c16b6627
parent 52116 abf9fcfa65cf
permissions -rwxr-xr-x
using (*)-syntax for partially applied infix is fine, contrary to ancient op-syntax

#!/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 "$@"