|
|
|
@ -31,7 +31,7 @@ if [ "${XDG_RUNTIME_DIR}" = "" ]; then
|
|
|
|
|
fi
|
|
|
|
|
#{{- end }}
|
|
|
|
|
|
|
|
|
|
env_file () {
|
|
|
|
|
_env_file () {
|
|
|
|
|
if [ ! -f "${1}" ]; then
|
|
|
|
|
return
|
|
|
|
|
fi
|
|
|
|
@ -43,23 +43,13 @@ env_file () {
|
|
|
|
|
)"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
env_file "${XDG_CONFIG_HOME}/user-dirs.dirs"
|
|
|
|
|
|
|
|
|
|
if [ -d "${XDG_CONFIG_HOME}/profile/env.d" ]; then
|
|
|
|
|
for file in "${XDG_CONFIG_HOME}"/profile/env.d/*.env; do
|
|
|
|
|
env_file "${file}"
|
|
|
|
|
done
|
|
|
|
|
unset file
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
unset env_file
|
|
|
|
|
#{{ $home := .chezmoi.homeDir -}}
|
|
|
|
|
_env_file "${XDG_CONFIG_HOME}/user-dirs.dirs"
|
|
|
|
|
#{{- range $file := (glob (joinPath $home ".config" "profile" "env.d" "*.env")) }}
|
|
|
|
|
_env_file "#{{ replace $home "${HOME}" $file }}"
|
|
|
|
|
#{{- end }}
|
|
|
|
|
|
|
|
|
|
if [ -d "${XDG_CONFIG_HOME}/profile/profile.d" ]; then
|
|
|
|
|
for file in "${XDG_CONFIG_HOME}"/profile/profile.d/*.sh; do
|
|
|
|
|
if [ -r "$file" ]; then
|
|
|
|
|
#shellcheck disable=1090
|
|
|
|
|
. "$file"
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
unset file
|
|
|
|
|
fi
|
|
|
|
|
unset _env_file
|
|
|
|
|
#{{ range $file := (glob (joinPath $home ".config" "profile" "profile.d" "*.sh")) }}
|
|
|
|
|
. "#{{ replace $home "${HOME}" $file }}"
|
|
|
|
|
#{{- end }}
|
|
|
|
|