2 let md5_create files reg =
3 let opts = "md5sum " ^ String.concat " " files ^ " > " ^ reg in
4 let rc = Unix.system opts in
7 | Unix.WEXITED i -> raise (Failure "Unable to create the md5sums file")
11 let opts = "md5sum -c " ^ reg in
12 let rc = Unix.system opts in
14 | Unix.WEXITED 0 -> true
15 | Unix.WEXITED _ -> false
18 let reg () = (Lazy.force Http_getter_env.dump_file) ^ ".md5"
22 (* maybe should be useda as a fallback *)
24 let is_in_sync_date () =
25 let get_last_mod_date f =
27 (Unix.stat f).Unix.st_mtime
29 | Unix.Unix_error (Unix.ENOENT, _, _)-> 0.0
31 let map_date = get_last_mod_date (Lazy.force Http_getter_env.cic_dbm_real) in
32 let dump_date = get_last_mod_date (Lazy.force Http_getter_env.dump_file) in
39 let create_hash files =
40 md5_create files (reg ())