2023-01-24 20:31:32 -08:00
|
|
|
{{- if (ne .host.distro.family "windows") -}}
|
2023-01-24 20:43:02 -08:00
|
|
|
#!/usr/bin/env bash
|
2023-04-12 18:27:13 -07:00
|
|
|
# @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.
|
2023-01-24 20:43:02 -08:00
|
|
|
|
2023-02-01 18:15:14 -08:00
|
|
|
### 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
|
2023-01-24 21:06:59 -08:00
|
|
|
{{ includeTemplate "universal/profile-inline" }}
|
|
|
|
EOF
|
2023-01-24 20:31:32 -08:00
|
|
|
|
2023-01-24 20:43:02 -08:00
|
|
|
### Ensure /tmp/tmp-logg is created and owned by root
|
2023-02-01 18:15:14 -08:00
|
|
|
# Add pre-scaffolding /tmp/tmp-logg
|
|
|
|
cat <<'EOF' > /tmp/tmp-logg
|
2023-01-24 21:06:59 -08:00
|
|
|
{{ includeTemplate "universal/logg-inline" }}
|
|
|
|
EOF
|
2023-01-24 20:31:32 -08:00
|
|
|
|
2023-01-24 20:52:47 -08:00
|
|
|
{{ end -}}
|