package genspio

  1. Overview
  2. Docs
type command =
  1. | Raw of Common.string
  2. | Comment of Common.string
  3. | Redirect of {
    1. block : command Common.list;
    2. stdout : compiled_value;
    }
  4. | If_then_else of {
    1. condition : Common.string;
    2. block_then : command Common.list;
    3. block_else : command Common.list;
    }
  5. | While of {
    1. condition : Common.string;
    2. block : command Common.list;
    }
  6. | Sub_shell of command Common.list
  7. | Make_directory of Common.string
  8. | Pipe of {
    1. blocks : command Common.list Common.list;
    }
and compiled_value =
  1. | Unit
  2. | Literal_value of Common.string
  3. | File of Common.string
  4. | Tmp_file_in_variable of Common.string
    (*

    File-path contained in variable.

    *)
  5. | Raw_inline of Common.string
  6. | Octal_value_in_variable of Common.string
type t = {
  1. commands : command Common.list;
  2. result : compiled_value;
}
val to_argument : ?arithmetic:Common.bool -> compiled_value -> Common.string
val to_ascii : compiled_value -> Common.string
val commands : t -> command Common.list
val to_path_argument : compiled_value -> Common.string
val pp_posix : Genspio.Language.Format.formatter -> t -> unit
val rawf : ('a, Format.formatter, unit, command) format4 -> 'a
val cmtf : ('a, Format.formatter, unit, command) format4 -> 'a
val unit : command Common.list -> t
val literal_value : Common.string -> t
val assert_unit : t -> unit
val redirect : stdout:t -> command Common.list -> t
val mktmp : tmpdb:Tmp_db.t -> ?expression:'a -> ?script:'b -> Genspio.Common.String.t -> t
val with_tmp : tmpdb:Tmp_db.t -> ?expression:'a -> ?script:'b -> Genspio.Common.String.t -> (t -> command list) -> t
val if_then_else : t -> t -> t -> t
val if_then : t -> t -> t
val bool_to_file : bool -> compiled_value -> command list
val bool_not : tmp:t -> t -> t
val return_value_to_bool : tmp:t -> t -> int -> t
val make_bool : condition:Common.string -> tmp:t -> command list -> t
val while_loop : t -> t -> t
val sub_shell : pre:command list -> command Common.list -> t
OCaml

Innovation. Community. Security.