diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-01-23 07:11:45 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-02-21 00:49:14 +0100 |
commit | 1bd2d4e31b739586cf91ddfe65349f79298af013 (patch) | |
tree | 4314c63d1e788788ab1366c9c1b2586d91bf38d4 /man/50-xdg-data-dirs.sh | |
parent | manager: run environment generators (diff) | |
download | systemd-1bd2d4e31b739586cf91ddfe65349f79298af013.tar.xz systemd-1bd2d4e31b739586cf91ddfe65349f79298af013.zip |
man: add systemd.environment-generator(7) with two examples
v2:
- add example files to EXTRA_DIST
v3:
- rework for the new scheme where nothing is written to disk
v4:
- use separate dirs for system and user env generators
Diffstat (limited to 'man/50-xdg-data-dirs.sh')
-rwxr-xr-x | man/50-xdg-data-dirs.sh | 12 |
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 |