mirage / checkseum

MIT License
15 stars 13 forks source link

Use ocaml Opam variables instead of relying on shebang #62

Closed vapourismo closed 2 years ago

vapourismo commented 2 years ago

Instead of relying on the shebang and env when running OCaml scripts, we can use Opam variables for the ocaml package to find the right ocaml executable.

This helps in situations where env is not available.

dinosaure commented 2 years ago

Seems good, we probably should remove the shebang from the file. I will do that next week and cut a release.

vapourismo commented 2 years ago

Much appreciated!

dinosaure commented 2 years ago

Thanks!

vapourismo commented 2 years ago

I just noticed something: %{ocaml:bin}%/bin/ocaml doesn't necessarily point to anything because ocaml is mostly a hollow package where as ocaml-base-compiler is the real deal. That's my bad - tested this with opam where ocaml and ocaml-base-compiler share the bin folder (in fact all packages do).

Maybe use just plain "ocaml" as the command instead of "%{ocaml:bin}%/bin/ocaml"? I think that would work more universally.