summaryrefslogtreecommitdiffstats
path: root/man/50-xdg-data-dirs.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 13:00:47 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 13:00:47 +0000
commit2cb7e0aaedad73b076ea18c6900b0e86c5760d79 (patch)
treeda68ca54bb79f4080079bf0828acda937593a4e1 /man/50-xdg-data-dirs.sh
parentInitial commit. (diff)
downloadsystemd-2cb7e0aaedad73b076ea18c6900b0e86c5760d79.tar.xz
systemd-2cb7e0aaedad73b076ea18c6900b0e86c5760d79.zip
Adding upstream version 247.3.upstream/247.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-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 0000000..89e9fbb
--- /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