lib/Tools/ocaml_setup_base
author wenzelm
Wed, 15 Jan 2025 15:13:39 +0100
changeset 81825 c551d4a418b9
parent 73405 lib/Tools/ocaml_setup@8510c6e98228
permissions -rwxr-xr-x
provide less ambitious "isabelle ocaml_setup_base", notably for platforms without gmp-dev;

#!/usr/bin/env bash
#
# Author: Makarius
#
# DESCRIPTION: setup OCaml base compiler 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