more robust: allow empty root (e.g. via symlink);
--- a/lib/Tools/ocaml_setup Tue Mar 19 16:14:59 2019 +0000
+++ b/lib/Tools/ocaml_setup Wed Mar 20 17:33:06 2019 +0100
@@ -6,7 +6,7 @@
set -e
-if [ -d "$ISABELLE_OPAM_ROOT" ]
+if [ -e "$ISABELLE_OPAM_ROOT/config" ]
then
isabelle_opam switch "$ISABELLE_OCAML_VERSION"
else
--- a/lib/scripts/ocamlc Tue Mar 19 16:14:59 2019 +0000
+++ b/lib/scripts/ocamlc Wed Mar 20 17:33:06 2019 +0100
@@ -4,7 +4,7 @@
#
# Invoke ocamlc via "opam".
-if [ -d "$ISABELLE_OPAM_ROOT" ]
+if [ -e "$ISABELLE_OPAM_ROOT/config" ]
then
isabelle_opam config exec --switch "$ISABELLE_OCAML_VERSION" -- ocamlc "$@"
else
--- a/lib/scripts/ocamlexec Tue Mar 19 16:14:59 2019 +0000
+++ b/lib/scripts/ocamlexec Wed Mar 20 17:33:06 2019 +0100
@@ -4,7 +4,7 @@
#
# Invoke command in OCaml environment setup by "opam".
-if [ -d "$ISABELLE_OPAM_ROOT" ]
+if [ -e "$ISABELLE_OPAM_ROOT/config" ]
then
isabelle_opam config exec --switch "$ISABELLE_OCAML_VERSION" -- "$@"
else