1
0
angie-conv-image/angie/conf.dist/core-preserve-env.conf.j2

35 lines
920 B
Plaintext
Raw Normal View History

{#- prologue -#}
{%- set penv = [] -%}
{%- if cfg.preserve_env -%}
{%- set penv = cfg.preserve_env -%}
{%- if penv is string -%}
{%- set penv = [penv] -%}
{%- elif penv is iterable -%}
{#- {%- set penv = penv -%} -#}
{%- else -%}
{%- set penv = [penv|string()] -%}
{%- endif -%}
{%- endif -%}
{%- set have = namespace() -%}
{%- set have.tz = false -%}
{%- set have.malloc_arena = false -%}
{#- scan -#}
{%- for v in penv -%}
{%- set have.tz = have.tz or re.match('TZ(=|$)', v|string()) -%}
{%- set have.malloc_arena = have.malloc_arena or re.match('MALLOC_ARENA_MAX(=|$)', v|string()) -%}
{%- endfor -%}
{#- main part -#}
{%- if not have.tz -%}
env TZ;
{% endif %}
{%- if not have.malloc_arena -%}
env MALLOC_ARENA_MAX;
{% endif %}
{%- for v in penv -%}
{%- if re.search("(\"|'|\\s)", v|string()) %}
env {{ (v|string()).__repr__() }};
{%- else %}
2024-07-11 13:37:35 +03:00
env {{ v }};
{%- endif %}
{%- endfor -%}