You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.6 KiB
Cheetah
64 lines
1.6 KiB
Cheetah
3 years ago
|
export LANGUAGE=en_US:en
|
||
|
export LC_MESSAGES=en_US.UTF-8
|
||
|
export LC_CTYPE=en_US.UTF-8
|
||
|
export LC_COLLATE=en_US.UTF-8
|
||
12 years ago
|
|
||
2 years ago
|
export XDG_BIN_HOME="${XDG_BIN_HOME:=$HOME/.local/bin}"
|
||
|
export XDG_CACHE_HOME="${XDG_CACHE_HOME:=$HOME/.cache}"
|
||
3 years ago
|
export XDG_CONFIG_DIRS="${XDG_CONFIG_DIRS:=/etc/xdg}"
|
||
2 years ago
|
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:=$HOME/.config}"
|
||
|
export XDG_DATA_DIRS="${XDG_DATA_DIRS:=/usr/local/share:/usr/share}"
|
||
|
export XDG_DATA_HOME="${XDG_DATA_HOME:=$HOME/.local/share}"
|
||
|
export XDG_INCLUDE_HOME="${XDG_INCLUDE_HOME:=$HOME/.local/include}"
|
||
|
export XDG_STATE_HOME="${XDG_STATE_HOME:=$HOME/.local/state}"
|
||
12 years ago
|
|
||
2 years ago
|
{{- if eq .chezmoi.os "darwin" -}}
|
||
4 years ago
|
if [ "${XDG_RUNTIME_DIR}" = "" ]; then
|
||
|
__TMPDIR__=
|
||
|
__LINK__=/tmp/$(id -u)
|
||
|
if [ -L "${__LINK__}" ]; then
|
||
|
__TMPDIR__="$(readlink "${__LINK__}")"
|
||
|
else
|
||
4 years ago
|
__TMPDIR__="$(mktemp -d)"
|
||
4 years ago
|
ln -s "${__TMPDIR__}" "${__LINK__}"
|
||
|
fi
|
||
|
XDG_RUNTIME_DIR="${__TMPDIR__}"
|
||
|
unset __TMPDIR__ __LINK__
|
||
|
fi
|
||
|
|
||
|
export XDG_RUNTIME_DIR
|
||
2 years ago
|
{{- end }}
|
||
4 years ago
|
|
||
4 years ago
|
env_file () {
|
||
3 years ago
|
if [ ! -f "${1}" ]; then
|
||
4 years ago
|
return
|
||
|
fi
|
||
|
eval "$(
|
||
3 years ago
|
grep -v '^\s*\#' "${1}" |
|
||
4 years ago
|
grep -v '^\s*$' |
|
||
|
sed 's/^\s*export//g' |
|
||
|
sed 's/^/export /g'
|
||
|
)"
|
||
|
}
|
||
|
|
||
|
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
|
||
|
fi
|
||
|
|
||
|
unset env_file
|
||
|
|
||
|
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
|
||
|
fi
|
||
|
|
||
2 years ago
|
# vim: ft=sh
|