mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 00:51:24 +03:00
f4d74c6105
Documentation is licensed under LGPL-2.1-or-later. Scripts are MIT to facilitate reuse. Examples are relicensed to CC0-1.0 to maximise copy-and-paste for users, with permission from authors.
14 lines
313 B
Bash
Executable File
14 lines
313 B
Bash
Executable File
#!/bin/bash
|
|
# SPDX-License-Identifier: CC0-1.0
|
|
|
|
# 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}"
|