Stream: Coq Platform devs & users

Topic: Opam question


view this post on Zulip Michael Soegtrop (Aug 11 2020 at 13:41):

@Karl Palmskog : I have an opam question: is there a less silly way to ask if a package is installed than [ -z "$(opam show --list-files coq-gappa)" ]

view this post on Zulip Karl Palmskog (Aug 11 2020 at 13:45):

@Michael Soegtrop yes, there is %{package:installed}, for example:

"--with-ocaml-freestanding" "%{ocaml-freestanding:installed}%"

view this post on Zulip Michael Soegtrop (Aug 11 2020 at 13:50):

I meant on the shell but you gave the right hint: [ $(opam var "coq-gappa:installed") == "true" ] works!


Last updated: Jan 30 2023 at 11:03 UTC