OCaml: Add a configuration lexer
This commit is contained in:
parent
638f886baf
commit
902734d610
4 changed files with 129 additions and 2 deletions
|
|
@ -1,8 +1,7 @@
|
|||
(* the side effect could be extracted to a log list in the schema *)
|
||||
|
||||
let identify : string =
|
||||
let os_release = String.split_on_char '\n' (File.read "/etc/os-release") in
|
||||
Utilities.Log.elog (String.concat "\n" os_release);
|
||||
|
||||
let os_equals = List.find (String.starts_with ~prefix:"NAME=") os_release in
|
||||
match String.split_on_char '=' os_equals with
|
||||
| [ _; s ] ->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue