diff --git a/packages/templates/build.yaml b/packages/templates/build.yaml index bce7f51f..bd60b24a 100644 --- a/packages/templates/build.yaml +++ b/packages/templates/build.yaml @@ -30,13 +30,16 @@ prelude: {{/* debug */}} {{/* depends on which comes first out of the below debug functions, only the first one will be executed */}} -{{/* if eq .Values.name "openvdb" }} +{{/* if eq .Values.name "blender" }} +{{ template "cr.dump" ( include "cr.merge_shell_commands" ( include "cr.prereqs" ( list .Values $packages "" ) ) ) }} {{ template "cr.dumpList" ( include "cr.prereqs" ( list .Values $packages "" ) ) }} {{ include "cr.dumpJson" ( get ( ( printf "debug:\n %s" ( include "cr.prereqs" ( list .Values $packages "" ) ) ) | fromYaml ) "debug" ) }} {{ end */}} {{/* end debug */}} -{{ include "cr.prereqs" ( list .Values $packages "" ) }} +{{ $prereqs := include "cr.prereqs" ( list .Values $packages "" ) }} +- | +{{ ( include "cr.merge_shell_commands" $prereqs ) | indent 2 }} {{ if eq .Values.category "layerbase" }} - | @@ -48,7 +51,7 @@ prelude: {{/* debug */}} {{/* depends on which comes first out of the below debug functions, only the first one will be executed */}} -{{/* if eq .Values.name "haskell" }} +{{/* if eq .Values.name "blender" }} {{ template "cr.dumpList" ( include "cr.package_setup" .Values ) }} {{ include "cr.dumpJson" ( get ( ( printf "debug:\n %s" ( include "cr.package_setup" .Values ) ) | fromYaml ) "debug" ) }} {{ end */}} diff --git a/packages/templates/functions.yaml b/packages/templates/functions.yaml index f6ae2697..2b875c20 100644 --- a/packages/templates/functions.yaml +++ b/packages/templates/functions.yaml @@ -444,6 +444,22 @@ {{- end }} +################################################################################ +## cr.merge_shell_commands ### +################################################################################ + +{{- define "cr.merge_shell_commands" }} + +{{- $command := "" }} +{{- range ( get ( ( printf "list:\n %s" . ) | fromYaml ) "list" ) }} +{{- $command = printf "%s\n%s; \\" $command ( trimAll "; \n" . ) }} +{{- end }} +{{- $command = printf "%s\necho;" $command . }} + +{{- $command }} + +{{- end }} + ################################################################################ ## flatten ### ################################################################################