Update doc comments

This commit is contained in:
Bryan Bennett 2024-06-18 06:53:53 -04:00
parent 5808a868f1
commit 33aa9228e2
No known key found for this signature in database
GPG key ID: EE149E4215408DE9

View file

@ -1,8 +1,8 @@
open Core;
module Unix = Core_unix;
/*** Run a process [name] with args [args], returning (exit_code, stdout text) */
let run_process = (name, args) => {
/*** Run a process [name] with args [args], returning (exit_code, stdout text) */
let stdout_chan =
Unix.open_process_in(name ++ " " ++ (args |> String.concat(~sep=" ")));
let stdout_content = stdout_chan |> In_channel.input_all;
@ -10,6 +10,7 @@ let run_process = (name, args) => {
(exit_code, stdout_content);
};
/*** Run nix with some fixed arguments, appending a user provided set of arguments. */
let nix = args =>
run_process(
"nix",
@ -17,7 +18,7 @@ let nix = args =>
);
let hash_files = filenames => {
/*** Hash all entries in [filenames]
/*** Hash all entries in [filenames] which represent existing files.
Returns Some(hex-string) or None if no filenames are found.
*/
let ctx = Sha1.init();
@ -27,7 +28,6 @@ let hash_files = filenames => {
switch (Sys_unix.file_exists(f)) {
| `Yes => true
| _ =>
// let fullpth = Filename_unix.realpath(f);
Printf.eprintf(
"Cannot find file %s (cwd: %s)\n",
f,
@ -53,6 +53,7 @@ let hash_files = filenames => {
};
let rec rmrf = path => {
/*** Remove [path] recursively */
switch (Unix.lstat(path).st_kind) {
| exception (Unix.Unix_error(_, _, _)) => ()
| S_REG