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