/dhall-containerfile/Containerfile/run.dhall

Copy path to clipboard

Examples

    run "Install emacs" [ "dnf install -y emacs", "dnf clean all" ]
=== [ Statement.Comment "Install emacs"
, Statement.Run "dnf install -y emacs && dnf clean all"
, Statement.Empty
]

Source

let Prelude = ../Prelude.dhall

let Statement = ./Statement.dhall

let run
: Text -> List Text -> List Statement
= \(comment : Text) ->
\(commands : List Text) ->
[ Statement.Comment comment
, Statement.Run (Prelude.Text.concatSep " && " commands)
, Statement.Empty
]

let example0 =
assert
: run "Install emacs" [ "dnf install -y emacs", "dnf clean all" ]
=== [ Statement.Comment "Install emacs"
, Statement.Run "dnf install -y emacs && dnf clean all"
, Statement.Empty
]

in run