diff options
Diffstat (limited to '.profile')
| -rw-r--r-- | .profile | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/.profile b/.profile index 99b456e..879b1e3 100644 --- a/.profile +++ b/.profile @@ -2,18 +2,26 @@ # set xdg runtime dir if it's not defined if [ -z "${XDG_RUNTIME_DIR}" ]; then export XDG_RUNTIME_DIR=/run/user/"$(id -u)" - if [ ! -d "${XDG_RUNTIME_DIR}" ]; then - mkdir -p "${XDG_RUNTIME_DIR}" - chmod 0700 "${XDG_RUNTIME_DIR}" - fi +fi +if [ ! -d "${XDG_RUNTIME_DIR}" ]; then + mkdir -p "${XDG_RUNTIME_DIR}" + chmod 0700 "${XDG_RUNTIME_DIR}" fi # set xdg cache dir if it's not defined if [ -z "${XDG_CACHE_DIR}" ]; then export XDG_CACHE_DIR=/tmp/"$(id -un)"/.cache - if [ ! -d "${XDG_CACHE_DIR}" ]; then - mkdir -p "${XDG_CACHE_DIR}" - chmod 0700 "${XDG_CACHE_DIR}" - fi +fi +if [ ! -d "${XDG_CACHE_DIR}" ]; then + mkdir -p "${XDG_CACHE_DIR}" + chmod 0700 "${XDG_CACHE_DIR}" +fi +# set xdg config home if it's not defined +if [ -z "${XDG_CONFIG_HOME}" ]; then + export XDG_CONFIG_HOME="${HOME}/.config" +fi +if [ ! -d "${XDG_CONFIG_HOME}" ]; then + mkdir -p "${XDG_CONFIG_HOME}" + chmod 0755 "${XDG_CONFIG_HOME}" fi if [ -d "${HOME}/bin" ]; then |