summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2021-05-31 16:48:39 +0200
committerRobert Günzler <r@gnzler.io>2021-05-31 16:48:39 +0200
commit8e7b444addee3719713349a7c7475ba744827da1 (patch)
tree1c24010b3458e32ab2cf38151c86ddbb1920c4c8
parentba2816cbaa894aa584a3ea48980278e11bc038d6 (diff)
profile: ensure XDG_DATA_HOME
-rw-r--r--.profile7
1 files changed, 7 insertions, 0 deletions
diff --git a/.profile b/.profile
index b4d799a..3b9a239 100644
--- a/.profile
+++ b/.profile
@@ -23,6 +23,13 @@ if [ ! -d "${XDG_CONFIG_HOME}" ]; then
 	mkdir -p "${XDG_CONFIG_HOME}"
 	chmod 0755 "${XDG_CONFIG_HOME}"
 fi
+if [ -z "${XDG_DATA_HOME}" ]; then
+	export XDG_DATA_HOME="${HOME}/.local/share"
+fi
+if [ ! -d "${XDG_DATA_HOME}" ]; then
+	mkdir -p "${XDG_DATA_HOME}"
+	chmod 0755 "${XDG_DATA_HOME}"
+fi
 
 if [ -d "${HOME}/bin" ]; then
 	pathprepend "${HOME}/bin"