I am trying to selectively embed some files based on a list provided via an environment variable and a flag. This works in Linux and unix-like things, but it won’t work on Windows.
Any ideas on how to do this portably?
class LexerFiles
extend BakedFileSystem
macro bake_selected_lexers
{% for lexer in `echo -n "$TT_LEXERS"`.split "," %}
bake_file {{ lexer }}+".xml", {{ read_file "lexers/" + lexer + ".xml" }}
{% end %}
end
{% if flag?(:nolexers) %}
bake_selected_lexers
{% else %}
bake_folder "../lexers", __DIR__
{% end %}
end