tarides / ocaml-platform-installer

The best way for developers to write software in OCaml
ISC License
61 stars 8 forks source link

Distrib: Improve the std outputs of the installer #62

Closed Julow closed 2 years ago

Julow commented 2 years ago

Remove the -x flag, which is unreadable now that the script grew. Add logging at every important steps and more importantly, in case of a problem.

The new output is:

=> Download ocaml-platform-42-linux-x86_64.tar
=> Install into /usr/local/bin
Opam is not installed, installing.
=> Download opam-2.1.2-x86_64-linux
Connecting to github.com (140.82.121.4:443)
Connecting to objects.githubusercontent.com (185.199.110.133:443)
saving to 'opam'
opam                 100% |*******************************************| 7068k  0:00:00 ETA
'opam' saved
=> Install into /usr/local/bin
Installation is done. Please run 'ocaml-platform' to setup the platform.

When it fails while installing Opam, it shows this:

=> Download ocaml-platform-42-linux-x86_64.tar
=> Install into /usr/local/bin
Opam is not installed, installing.
Cannot install opam for linux x86_64.
Opam is required to setup the platform. Please install it via your package manager or obtai
n it at https://opam.ocaml.org/
Once Opam is installed, run 'ocaml-platform'.