{{- if (ne .host.distro.family "windows") -}}
#!/usr/bin/env bash
# @file Logger Setup
# @brief Ensures environment variables are utilized and that logging functionality is available to Install Doctor
# @description
#     This script pipes environment variables and a logger function to a temporary file that is included by other scripts.
#     It is included as a temporary external file to aid in debugging since if the included files were inlined in scripts
#     the scripts would be verbose when debugging.

### Ensure /tmp/tmp-profile is created
# Add pre-scaffolding profile to /tmp/tmp-profile so it's easier to navigate through scripts
cat <<'EOF' > /tmp/tmp-profile
{{ includeTemplate "universal/profile-inline" }}
EOF

### Ensure /tmp/tmp-logg is created and owned by root
# Add pre-scaffolding /tmp/tmp-logg
cat <<'EOF' > /tmp/tmp-logg
{{ includeTemplate "universal/logg-inline" }}
EOF

{{ end -}}
