Skip to content

Commit

Permalink
Driver: create directory if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
panglesd committed Aug 20, 2024
1 parent 9142c79 commit c5f160a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/driver/landing_pages.ml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
open Packages
open Odoc_unit
let write_file file content = Bos.OS.File.write file content |> Result.get_ok

let make_unit ~odoc_dir ~odocl_dir ~mld_dir ~output_dir rel_path ~content
?(include_dirs = []) ~pkgname ~pkg_args () =
let input_file = Fpath.(mld_dir // rel_path / "index.mld") in
let odoc_file = Fpath.(odoc_dir // rel_path / "page-index.odoc") in
let odocl_file = Fpath.(odocl_dir // rel_path / "page-index.odocl") in
let () = write_file input_file content in
let () = Util.write_file input_file (String.split_on_char '\n' content) in
let parent_id = rel_path |> Odoc.Id.of_fpath in
{
parent_id;
Expand Down

0 comments on commit c5f160a

Please sign in to comment.