Source

spotlib / lib / xsys.ml

The default branch has multiple heads

Full commit
1
2
3
4
5
6
7
8
let mkdir = Xunix.mkdir

let checkenv s = try ignore (Sys.getenv s); true with Not_found -> false

let command fmt = Printf.kprintf Sys.command fmt
let must fmt = Printf.kprintf (fun s -> if Sys.command s <> 0 then Exn.failwithf "command %s failed" s) fmt
let cp = must "/bin/cp %s %s"
let patch_p1 = must "/bin/patch -p1 < %s"