Last change
on this file since 68 was 66, checked in by Izuru Yakumo, 8 months ago |
Migrate the codebase to the latest revision of Cmdliner
Signed-off-by: Izuru Yakumo <yakumo.izuru@…>
|
File size:
730 bytes
|
Line | |
---|
1 | open Logarion
|
---|
2 |
|
---|
3 | let unfile files =
|
---|
4 | let dirs, files = File_store.split_filetypes files in
|
---|
5 | let unlink dir file = try Unix.unlink (Filename.concat dir file) with
|
---|
6 | Unix.(Unix_error(ENOENT,_,_))-> () in
|
---|
7 | List.iter (fun d -> List.iter (unlink d) files) dirs
|
---|
8 |
|
---|
9 | open Cmdliner
|
---|
10 | let files = Arg.(value & pos_all string [] & info [] ~docv: "Text filenames and subdirectories")
|
---|
11 |
|
---|
12 | let unfile_t = Term.(const unfile $ files)
|
---|
13 |
|
---|
14 | let cmd =
|
---|
15 | let doc = "Unfile texts from subdirectories" in
|
---|
16 | let man = [
|
---|
17 | `S Manpage.s_description;
|
---|
18 | `P "Unfile texts in parameter from directories in parameter, by removing hardlinks" ]
|
---|
19 | in
|
---|
20 | let info = Cmd.info "unfile" ~version:"%%VERSION%%" ~doc ~man in
|
---|
21 | Cmd.v info unfile_t
|
---|
Note:
See
TracBrowser
for help on using the repository browser.