- let data = HExtlib.input_file rootpath in
- let buri =
- let lines = Str.split (Str.regexp "\n") data in
- let lines =
- List.map (fun l ->
- match Str.split (Str.regexp "=") l with
- | [k;v] -> Pcre.replace ~pat:" " k, Pcre.replace ~pat:" " v
- | _ -> raise (Failure ("Malformed root file: " ^ rootpath)))
- lines
- in
- List.assoc "baseuri" lines
- in