summaryrefslogtreecommitdiff
path: root/man/50-xdg-data-dirs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'man/50-xdg-data-dirs.sh')
-rwxr-xr-xman/50-xdg-data-dirs.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/man/50-xdg-data-dirs.sh b/man/50-xdg-data-dirs.sh
new file mode 100755
index 0000000000..073174cb40
--- /dev/null
+++ b/man/50-xdg-data-dirs.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# set the default value
+XDG_DATA_DIRS="${XDG_DATA_DIRS:-/usr/local/share/:/usr/share}"
+
+# add a directory if it exists
+if [[ -d /opt/foo/share ]]; then
+ XDG_DATA_DIRS=/opt/foo/share:${XDG_DATA_DIRS}
+fi
+
+# write our output
+echo XDG_DATA_DIRS=$XDG_DATA_DIRS