The following is just too simple:
|
additional_platforms=$(cat $file \ |
|
| sed -E 's/(.*)\{%(.*)%\}(.*)/# \1\2\3/g' \ |
|
| tr -d '{{' | tr -d '}}' \ |
|
| ${HOME}/bin/yq '.extra.additional-platforms[]') |
This will fail for anything that uses multiline jinja functions:
{% set deps = [
"eigen >=3.4.0"
]
+ (["libgomp", "sysroot_linux-64 =2.17"] if linux else [])
+ (["llvm-openmp"] if osx else [])
%}