Skip to content

Support a file list in cat user action #5795

@MisterDA

Description

@MisterDA

Desired Behavior

The cat user action could support a list of files to concatenate, instead of currently a single file. This would allow to concatenate all the dependencies without having to list them by hand (as a combination of with-stdout-to, prog, and cat could achieve).

Example

(this is perhaps not a valid cram test but I hope you'll get the idea)

  $ echo '(dune lang 3.2)(name test)' >dune-project
  $ echo hello >hello; echo world >world
  $ cat >dune <<EOF
  > (rule
  >  (targets file)
  >  (deps hello world)
  >  (action (with-stdout-to %{targets} (cat %{deps}))))
  > EOF
  $ dune build @all
  $ [ "helloworld" == "$(cat file)" ]

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions