| 69135 |      1 | #!/usr/bin/env bash
 | 
|  |      2 | #
 | 
|  |      3 | # Author: Makarius
 | 
|  |      4 | #
 | 
| 69500 |      5 | # DESCRIPTION: setup OCaml via OPAM
 | 
| 69135 |      6 | 
 | 
| 69911 |      7 | set -e
 | 
|  |      8 | 
 | 
| 69948 |      9 | if [ -d "$ISABELLE_OPAM_ROOT/$ISABELLE_OCAML_VERSION/bin" ]
 | 
| 69139 |     10 | then
 | 
| 69948 |     11 |   isabelle_opam switch -y "$ISABELLE_OCAML_VERSION"
 | 
|  |     12 | elif [ -e "$ISABELLE_OPAM_ROOT/config" ]
 | 
|  |     13 | then
 | 
|  |     14 |   isabelle_opam switch create -y "$ISABELLE_OCAML_VERSION"
 | 
| 69139 |     15 | else
 | 
| 73405 |     16 |   mkdir -p "$ISABELLE_OPAM_ROOT"
 | 
|  |     17 |   cd "$ISABELLE_OPAM_ROOT"
 | 
| 69942 |     18 |   isabelle_opam init -y --disable-sandboxing --no-setup --compiler="$ISABELLE_OCAML_VERSION"
 | 
| 69139 |     19 | fi
 | 
| 69911 |     20 | 
 | 
| 69948 |     21 | isabelle_opam install -y zarith
 |