lib/Tools/ocaml_setup
author wenzelm
Wed, 31 Jan 2024 12:43:06 +0100
changeset 79556 0631dfc0db07
parent 73405 8510c6e98228
child 81825 c551d4a418b9
permissions -rwxr-xr-x
more robust check of ISABELLE_PLATFORM_FAMILY within settings environment, to support its reunification with Isabelle/Scala (see also a33a6e541cbb, f3a356c64193);

#!/usr/bin/env bash
#
# Author: Makarius
#
# DESCRIPTION: setup OCaml via OPAM

set -e

if [ -d "$ISABELLE_OPAM_ROOT/$ISABELLE_OCAML_VERSION/bin" ]
then
  isabelle_opam switch -y "$ISABELLE_OCAML_VERSION"
elif [ -e "$ISABELLE_OPAM_ROOT/config" ]
then
  isabelle_opam switch create -y "$ISABELLE_OCAML_VERSION"
else
  mkdir -p "$ISABELLE_OPAM_ROOT"
  cd "$ISABELLE_OPAM_ROOT"
  isabelle_opam init -y --disable-sandboxing --no-setup --compiler="$ISABELLE_OCAML_VERSION"
fi

isabelle_opam install -y zarith