Skip to content

Commit

Permalink
utils/Repo: add_prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
pveber committed Nov 6, 2017
1 parent ffd45e7 commit 9104656
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/utils/repo.ml
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,8 @@ let to_term ?(precious = []) ~outdir items =

let build ?np ?mem ?logger ?keep_all ?precious ?bistro_dir ~outdir repo =
Term.run ?np ?mem ?logger ?keep_all ?bistro_dir (to_term ~outdir ?precious repo)

let add_prefix prefix items =
List.map items ~f:(function
| Repo_item (p, w) -> Repo_item (prefix @ p, w)
)
2 changes: 2 additions & 0 deletions lib/utils/repo.mli
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ type t = item list

val ( %> ) : string list -> _ workflow -> item

val add_prefix : string list -> t -> t

val to_term :
?precious:Bistro.any_workflow list ->
outdir:string ->
Expand Down

0 comments on commit 9104656

Please sign in to comment.