about summary refs log tree commit diff stats
path: root/profile/profile
blob: a0dc2812ae32c526b2214cbd6774ce4de7a42e2e (plain)
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
# ~/.profile -*- sh -*-
# vim: ft=sh

# XDG directories
export XDG_CONFIG_HOME="$HOME/etc"
export XDG_CACHE_HOME="$HOME/var/cache"
export XDG_DATA_HOME="$HOME/usr/share"

export XDG_DATA_DIRS="${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
export XDG_CONFIG_DIRS="${XDG_CONFIG_DIRS:-/etc/xdg}"

# source files in $XDG_CONFIG_HOME/profile
if [ -d "$XDG_CONFIG_HOME/profile" ]; then
        for file in "$XDG_CONFIG_HOME"/profile/*.sh; do
                [ -r "$file" ] && . "$file"
        done
fi

# refresh profile
reprofile() {
    printf "Loading ~/.profile..." >&2
    if . "$HOME/.profile"; then
        echo "OK." >&2
    else
        echo "ERROR!" >&2
    fi
}