upstream: https://github.com/avsm/osrelease
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ocaml-linkedin: apply dune fmt

Pure formatting changes from `dune fmt`: doc comment placement moves
from above the binding to below it for `type`s, multi-line `match`
expressions collapse onto one line where they fit, and infix operator
applications pick up spaces (`Soup.($?)` -> `Soup.( $? )`). No
semantic changes.

+27 -7
+20 -7
README.md
··· 6 6 7 7 ## Installation 8 8 9 + Install with opam: 10 + 11 + ```sh 12 + $ opam install osrelease 9 13 ``` 10 - opam install osrelease 14 + 15 + If opam cannot find the package, it may not yet be released in the public 16 + `opam-repository`. Add the overlay repository, then install it: 17 + 18 + ```sh 19 + $ opam repo add samoht https://tangled.org/gazagnaire.org/opam-overlay.git 20 + $ opam update 21 + $ opam install osrelease 11 22 ``` 12 23 13 24 ## Usage 14 25 15 26 ```ocaml 16 - let arch = Osrelease.Arch.v () in 17 - let os = Osrelease.OS.v () in 18 - Format.printf "Running on %a / %a\n" Osrelease.OS.pp os Osrelease.Arch.pp arch; 19 - match Osrelease.Distro.v () with 20 - | Ok distro -> Format.printf "Distro: %a\n" Osrelease.Distro.pp distro 21 - | Error (`Msg msg) -> Format.eprintf "Detection failed: %s\n" msg 27 + let arch = Osrelease.Arch.v () 28 + let os = Osrelease.OS.v () 29 + let () = 30 + Format.printf "Running on %a / %a\n" 31 + Osrelease.OS.pp os Osrelease.Arch.pp arch; 32 + match Osrelease.Distro.v () with 33 + | Ok distro -> Format.printf "Distro: %a\n" Osrelease.Distro.pp distro 34 + | Error (`Msg msg) -> Format.eprintf "Detection failed: %s\n" msg 22 35 ``` 23 36 24 37 ## API
+4
dune
··· 1 1 (env 2 2 (dev 3 3 (flags :standard %{dune-warnings}))) 4 + 5 + (mdx 6 + (files README.md) 7 + (libraries osrelease))
+2
dune-project
··· 1 1 (lang dune 3.21) 2 + (using mdx 0.4) 2 3 (name osrelease) 3 4 (generate_opam_files true) 4 5 ··· 20 21 bos 21 22 astring 22 23 fmt 24 + (mdx :with-test) 23 25 ))
+1
osrelease.opam
··· 18 18 "bos" 19 19 "astring" 20 20 "fmt" 21 + "mdx" {with-test} 21 22 "odoc" {with-doc} 22 23 ] 23 24 build: [