-
Notifications
You must be signed in to change notification settings - Fork 2
/
profile
28 lines (24 loc) · 899 Bytes
/
profile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Used as a source point for most other stuff which wants my
# environment.
XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME/.config}
XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache}
XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share}
XDG_STATE_HOME=${XDG_STATE_HOME:-$HOME/.local/state}
XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/run/user/$(id -u)}
export XDG_CONFIG_HOME XDG_CACHE_HOME XDG_DATA_HOME XDG_STATE_HOME XDG_RUNTIME_DIR
if [ -d "${XDG_CONFIG_HOME}/profile.d/" ]; then
for file in "${XDG_CONFIG_HOME}/profile.d/"*.sh; do
test -r "$file" && . "$file"
done
for file in "${XDG_CONFIG_HOME}/profile.d/"*.sh."$(uname -s)"; do
test -r "$file" && . "$file"
done
for file in "${XDG_CONFIG_HOME}/profile.d/"*.sh."$(hostname -d)"; do
test -r "$file" && . "$file"
done
for file in "${XDG_CONFIG_HOME}/profile.d/"*.sh."$(hostname)"; do
test -r "$file" && . "$file"
done
unset file
fi
# vim:ft=sh