more robust: allow empty root (e.g. via symlink);
authorwenzelm
Wed Mar 20 17:33:06 2019 +0100 (5 weeks ago)
changeset 69924512ac874bb9d
parent 69923 cd8b6f32ed79
child 69925 c90678ad942d
more robust: allow empty root (e.g. via symlink);
lib/Tools/ocaml_setup
lib/scripts/ocamlc
lib/scripts/ocamlexec
     1.1 --- a/lib/Tools/ocaml_setup	Tue Mar 19 16:14:59 2019 +0000
     1.2 +++ b/lib/Tools/ocaml_setup	Wed Mar 20 17:33:06 2019 +0100
     1.3 @@ -6,7 +6,7 @@
     1.4  
     1.5  set -e
     1.6  
     1.7 -if [ -d "$ISABELLE_OPAM_ROOT" ]
     1.8 +if [ -e "$ISABELLE_OPAM_ROOT/config" ]
     1.9  then
    1.10    isabelle_opam switch "$ISABELLE_OCAML_VERSION"
    1.11  else
     2.1 --- a/lib/scripts/ocamlc	Tue Mar 19 16:14:59 2019 +0000
     2.2 +++ b/lib/scripts/ocamlc	Wed Mar 20 17:33:06 2019 +0100
     2.3 @@ -4,7 +4,7 @@
     2.4  #
     2.5  # Invoke ocamlc via "opam".
     2.6  
     2.7 -if [ -d "$ISABELLE_OPAM_ROOT" ]
     2.8 +if [ -e "$ISABELLE_OPAM_ROOT/config" ]
     2.9  then
    2.10    isabelle_opam config exec --switch "$ISABELLE_OCAML_VERSION" -- ocamlc "$@"
    2.11  else
     3.1 --- a/lib/scripts/ocamlexec	Tue Mar 19 16:14:59 2019 +0000
     3.2 +++ b/lib/scripts/ocamlexec	Wed Mar 20 17:33:06 2019 +0100
     3.3 @@ -4,7 +4,7 @@
     3.4  #
     3.5  # Invoke command in OCaml environment setup by "opam".
     3.6  
     3.7 -if [ -d "$ISABELLE_OPAM_ROOT" ]
     3.8 +if [ -e "$ISABELLE_OPAM_ROOT/config" ]
     3.9  then
    3.10    isabelle_opam config exec --switch "$ISABELLE_OCAML_VERSION" -- "$@"
    3.11  else