2017-05-27 23:48:48 +00:00
|
|
|
module Outputs = struct
|
|
|
|
type t =
|
|
|
|
| Stdout
|
|
|
|
| Stderr
|
|
|
|
| Outputs (** Both Stdout and Stderr *)
|
|
|
|
end
|
|
|
|
|
|
|
|
module type Ast = sig
|
2017-05-30 16:35:49 +00:00
|
|
|
type program
|
2017-05-27 23:48:48 +00:00
|
|
|
type path
|
|
|
|
type string
|
|
|
|
|
|
|
|
type t =
|
2017-05-30 16:35:49 +00:00
|
|
|
| Run of program * string list
|
2017-05-27 23:48:48 +00:00
|
|
|
| Chdir of path * t
|
|
|
|
| Setenv of string * string * t
|
|
|
|
| Redirect of Outputs.t * path * t
|
|
|
|
| Ignore of Outputs.t * t
|
|
|
|
| Progn of t list
|
|
|
|
| Echo of string
|
|
|
|
| Create_file of path
|
|
|
|
| Cat of path
|
|
|
|
| Copy of path * path
|
|
|
|
| Symlink of path * path
|
|
|
|
| Copy_and_add_line_directive of path * path
|
|
|
|
| System of string
|
|
|
|
| Bash of string
|
|
|
|
| Update_file of path * string
|
|
|
|
| Rename of path * path
|
|
|
|
| Remove_tree of path
|
2017-05-29 13:51:46 +00:00
|
|
|
| Mkdir of path
|
2017-05-27 23:48:48 +00:00
|
|
|
end
|
|
|
|
|