this repo has no description
1(** disk command: show disk usage breakdown *)
2
3open Cmdliner
4
5let run profile_name profile_dir =
6 match Common.load_profile ~profile_dir ~name:profile_name with
7 | Error (`Msg e) -> Printf.eprintf "Error: %s\n%!" e; 1
8 | Ok (_profile, paths) ->
9 let os_dir = paths.os_dir in
10 let cache_dir = paths.cache_dir in
11 let report = Day11_lib.Disk_usage.scan ~os_dir ~cache_dir in
12 Fmt.pr "%a\n" Day11_lib.Disk_usage.pp report;
13 0
14
15let cmd =
16 let info = Cmd.info "disk" ~doc:"Show disk usage breakdown" in
17 let term = Term.(const run $ Common.profile_term $ Common.profile_dir_term) in
18 Cmd.v info term