36412a64ca
- /home/.chezmoitemplates/universal/profile-inline - /home/.chezmoitemplates/universal/logg-inline - /home/.chezmoitemplates/universal/logg-compat - /home/.chezmoitemplates/universal/logg-before - /home/.chezmoitemplates/universal/logg - /home/.chezmoitemplates/universal/profile - /home/.chezmoitemplates/universal/profile-before - /home/.chezmoiscripts/_universal/run_before_01-add-temporary-includes.tmpl
26 lines
No EOL
764 B
Cheetah
26 lines
No EOL
764 B
Cheetah
{{- if (ne .host.distro.family "windows") -}}
|
|
#!/usr/bin/env bash
|
|
|
|
### Ensure /tmp/tmp-profile is created and owned by root
|
|
if [ ! -f /tmp/tmp-profile ]; then
|
|
# 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
|
|
|
|
# Make /tmp/tmp-profile owned by root to prevent tampering
|
|
sudo chown root /tmp/tmp-profile
|
|
fi
|
|
|
|
### Ensure /tmp/tmp-logg is created and owned by root
|
|
if [ ! -f /tmp/tmp-logg ]; then
|
|
# Add pre-scaffolding /tmp/tmp-logg
|
|
cat << EOF > /tmp/tmp-logg
|
|
{{ includeTemplate "universal/logg-inline" }}
|
|
EOF
|
|
|
|
# Make /tmp/tmp-logg owned by root to prevent tampering
|
|
sudo chown root /tmp/tmp-logg
|
|
fi
|
|
|
|
{{ end -}} |